anchor.diff:      test_server:stop_node(R),
       {Loop,A}.
       
  -setup_timeout_sink(Timeout, AutoClose) ->
  -    Dir = filename:dirname(code:which(?MODULE)),
  -    {ok,R} = test_server:start_node(?UNIQ_NODE_NAME, slave,
  -                                    [{args,"-pa " ++ Dir}]),
  +setup_timeout_sink(RNode, Timeout, AutoClose) ->
       Host = get_hostname(node()),
       {ok, L} = gen_tcp:listen(0, [{active,false},{packet,2},
   				 {send_timeout,Timeout},
  
positive.code:    
  %% Test the send_timeout socket option.
  send_timeout(Config) when is_list(Config) ->
      %% Basic
      BasicFun =
  	fun(AutoClose) ->
  	     {Loop,A,RNode} = setup_timeout_sink(1000, AutoClose),
  	     {error,timeout} =
  		 Loop(fun() ->
  			      Res = gen_tcp:send(A,<<1:10000>>),
  			      %%erlang:display(Res),
  			      Res
  		      end),
  	     %% Check that the socket is not busy/closed...
  	     Error = after_send_timeout(AutoClose),
  	     {error,Error} = gen_tcp:send(A,<<"Hej">>),
  	     test_server:stop_node(RNode)
  	end,
      BasicFun(false),
      BasicFun(true),
      %% Check timeout length
      Self = self(),
      Pid = spawn(fun() ->
                          {Loop,A,RNode} = setup_timeout_sink(1000, true),
                          {error,timeout} = Loop(fun() ->
                                       Res = gen_tcp:send(A,<<1:10000>>),
                                       %%erlang:display(Res),
                                       Self ! Res,
                                       Res
                               end),
                          test_server:stop_node(RNode)
  	      end),
      Diff = get_max_diff(),
      io:format("Max time for send: ~p~n",[Diff]),
      true = (Diff > 500) and (Diff < 1500),
      %% Let test_server slave die...
      Mon = erlang:monitor(process, Pid),
      receive {'DOWN',Mon,process,Pid,_} -> ok end,
      %% Check that parallell writers do not hang forever
      ParaFun =
  	fun(AutoClose) ->
  		{Loop,A,RNode} = setup_timeout_sink(1000, AutoClose),
  		SenderFun = fun() ->
  				    {error,Error} =
  					Loop(fun() ->
  						     gen_tcp:send(A, <<1:10000>>)
  					     end),
  				    Self ! {error,Error}
  			    end,
  		spawn_link(SenderFun),
  		spawn_link(SenderFun),
                  receive
                      {error,timeout} -> ok
                  after 10000 ->
                            exit(timeout)
                  end,
  		NextErr = after_send_timeout(AutoClose),
                  receive
                      {error,NextErr} -> ok
                  after 10000 ->
                            exit(timeout)
                  end,
  		{error,NextErr} = gen_tcp:send(A,<<"Hej">>),
  		test_server:stop_node(RNode)
  	end,
      ParaFun(false),
      ParaFun(true),
      ok.
  
  mad_sender(S) ->
  
negative.code: 		     end
  	     end,
      {ok, C} = Remote(fun() ->
  			     gen_tcp:connect(Host, Port, [{active,false}])
  		     end),
      {ok,A} = gen_tcp:accept(L),
      gen_tcp:send(A, "Hello"),
      {ok, "H"++_} = Remote(fun() -> gen_tcp:recv(C, 0) end),
      {A,C}.
  
  timeout_sink_loop(Action) ->
      Ret = Action(),
      case Ret of
  	ok ->
  	    receive after 1 -> ok end,
  	    timeout_sink_loop(Action);
  	Other ->
  	    Other
      end.
       
  has_superfluous_schedulers() ->
      case {erlang:system_info(schedulers),
  