anchor.diff:  port_cmd_(Socket, Data) ->
       erlang:port_command(Socket, Data).
   
  -
  +system_continue(_, _, {State, _NrOfChildren}) ->
  +	loop(State).
  +
  +-spec system_terminate(any(), _, _, _) -> no_return().
  +system_terminate(Reason, _, _, {State, _NrOfChildren}) ->
  +	teardown(State, Reason).
  +
  +system_code_change(Misc, _, _, _) ->
  +	{ok, Misc}.
  
positive.code: 
  -export([init/4,
           loop/1]).
  
  -record(st, {socket,
               buffer= <<>>,
  
negative.code: handle_message({'EXIT', _Parent, Reason}, #st{fsm_state=FsmState0, fsm_mod=FsmMod} = State) ->
      _ = FsmMod:msg_in(disconnect, FsmState0),
      {exit, Reason, State};
  handle_message({system, From, Request}, State) ->
      %% Not sure if passing the parent as undefined is really allowed,
      %% but process state inspection at least seem to work fine.
      Parent = undefined,
      sys:handle_system_msg(Request, From, Parent, ?MODULE, [],
                            {State, 0});
  handle_message(OtherMsg, #st{fsm_state=FsmState0, fsm_mod=FsmMod, pending=Pending} = State) ->
      case FsmMod:msg_in(OtherMsg, FsmState0) of
          {ok, FsmState1, Out} ->
  