anchor.diff:                        die -> ok
                     end
             end,
  -    Pid =  rpc:call(R,erlang,spawn,[fun() -> Fun(Fun) end]),
  +    p("[setup] create remote runner"),
  +    Pid = rpc:call(R,erlang,spawn,[fun() -> Fun(Fun) end]),
       {ok, Port} = inet:port(L),
       Remote = fun(Fu) ->
                        Pid ! {self(), Fu},
  -                     receive {Pid,X} -> X
  -                     end
  +                     receive {Pid,X} -> X end
                end,
  -    {ok, C} = Remote(fun() -> 
  -			     gen_tcp:connect(Host,Port,
  -					     [{active,false},{packet,2}]) 
  -		     end),
  -    {ok,A} = gen_tcp:accept(L),
  +    Connect = fun() -> 
  +                      gen_tcp:connect(Host,Port,
  +                                      [{active,false},{packet,2}]) 
  +              end,
  +    p("[setup] create (remote) connection"),
  +    C = case Remote(Connect) of
  +            {ok, CSock} ->
  +                CSock;
  +            {error, eaddrnotavail = CReason} ->
  +                (catch test_server:stop_node(R)),
  +                skip(connect_failed_str(CReason))
  +        end,
  +    p("[setup] accept (local) connection"),
  +    A = case gen_tcp:accept(L) of
  +            {ok, ASock} ->
  +                ASock;
  +            {error, eaddrnotavail = AReason} ->
  +                (catch test_server:stop_node(R)),
  +                skip(accept_failed_str(AReason))
  +        end,
  +    p("[setup] send message"),
       gen_tcp:send(A,"Hello"),
       {ok, "Hello"} = Remote(fun() -> gen_tcp:recv(C,0) end),
  +    p("[setup] close (remote) connection"),
       ok =  Remote(fun() -> gen_tcp:close(C) end),
       Loop2 = fun(_,_,_,0) ->
   		    {failure, timeout}; 
  
positive.code: 	     ok = receive {tcp_closed, A} -> error after 1000 -> ok end,
  	     ok = inet:setopts(A,[{active,once}]),
  	     ok = receive {tcp_closed, A} -> ok after 1000 -> error end
       end)().
  
  %% Check that active n and tcp_close messages behave as expected.
  active_n_closed(Config) when is_list(Config) ->
  
negative.code: 		    case F2() of
  			MA -> MA;
  			MB -> MB;
  			Other -> p("~p",[Other]),
  				 receive after 1000 -> ok end,
  				 L2(L2,{MA,MB},F2,N-1)
  		    end
  	    end,
      Loop = fun(Match2,F3) ->  Loop2(Loop2,Match2,F3,10) end,
      p("[setup] stop slave node"),
      test_server:stop_node(R),
      p("[setup] done"),
      {Loop,A}.
      
  setup_timeout_sink(RNode, Timeout, AutoClose) ->
  