anchor.diff:  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   %% This is the most basic of tests.
  +%% We create a listen socket, then spawns processes that create
  +%% monitors to it...
  +socket_monitor1_manys(Config) when is_list(Config) ->
  +    ?TC_TRY(socket_monitor1_manys,
  +            fun() -> do_socket_monitor1_manys(Config) end).
  +
  +do_socket_monitor1_manys(Config) ->
  +    ?P("begin"),
  +    Self         = self(),
  +    Type         = ?SOCKET_TYPE(Config),
  +    ?P("[client] create socket(s)"),
  +    {ok, LSock1} = ?LISTEN(Config),
  +    {ok, LSock2} = ?LISTEN(Config),
  +    {ok, LSock3} = ?LISTEN(Config),
  +    {ok, LSock4} = ?LISTEN(Config),
  +    {ok, LSock5} = ?LISTEN(Config),
  +    F  = fun(S, Fun) -> spawn_monitor(fun() -> Fun(S, Self) end) end,
  +    F1 = fun(Sockets, Parent) when is_list(Sockets) andalso is_pid(Parent) ->
  +		 ?P("[client] create monitor(s)"),
  +		 Monitors = [{inet:monitor(Socket), Socket} ||
  +				Socket <- Sockets],
  +		 Parent ! {self(), ready},
  +		 sm_await_socket_down2(Monitors, Type)
  +	 end,
  +    ?P("spawn client"),
  +    {Pid1, Mon1} = F([LSock1, LSock2, LSock3, LSock4, LSock5], F1),
  +    ?P("await client ready"),
  +    sm_await_client_ready(Pid1),
  +    ?P("close socket(s)"),
  +    gen_tcp:close(LSock1),
  +    gen_tcp:close(LSock2),
  +    gen_tcp:close(LSock3),
  +    gen_tcp:close(LSock4),
  +    gen_tcp:close(LSock5),
  +    ?P("await client termination"),
  +    sm_await_down(Pid1, Mon1, ok),
  +    ?P("done"),
  +    ok.
  +
  +
  +sm_await_socket_down2(Monitors, ExpType) ->
  +    sm_await_socket_down2(Monitors, ExpType, "client").
  +
  +sm_await_socket_down2([], _ExpType, Name) ->
  +    ?P("[~s] all sockets down", [Name]),
  +    exit(ok);
  +sm_await_socket_down2(Mons, ExpType, Name) when is_list(Mons) ->
  +    ?P("[~s] await socket down", [Name]),
  +    %% receive
  +    %% 	{'DOWN', Mon, Type, Sock, Info} when (Type =:= ExpType) andalso 
  +    %% 					     (Mon  =:= ExpMon)  andalso 
  +    %% 					     (Sock =:= ExpSock) ->
  +    %% 	    ?P("[~s] received expected (socket) down message: "
  +    %% 	       "~n   Mon:  ~p"
  +    %% 	       "~n   Type: ~p"
  +    %% 	       "~n   Sock: ~p"
  +    %% 	       "~n   Info: ~p", [Name, Mon, Type, Sock, Info]),
  +    %% 	    sm_await_socket_down2(Mons, ExpType, Name)
  +    %% end.
  +    receive
  +	{'DOWN', Mon, Type, Sock, Info} when (Type =:= ExpType) ->
  +	    ?P("[~s] received expected (socket) down message: "
  +	       "~n   Mon:  ~p"
  +	       "~n   Type: ~p"
  +	       "~n   Sock: ~p"
  +	       "~n   Info: ~p", [Name, Mon, Type, Sock, Info]),
  +	    case lists:keysearch(Mon, 1, Mons) of
  +		{value, {Mon, Sock}} ->
  +		    Mons2 = lists:keydelete(Mon, 1, Mons),
  +		    sm_await_socket_down2(Mons2, ExpType, Name);
  +		{value, Value} ->
  +		    ?P("[~s] Unexpected socket down: "
  +		       "~n   Value: ~p", [Name, Value]),
  +		    ct:fail({unexpected_monitor, Mon, Value});
  +		false ->
  +		    ct:fail({unknown_monitor, Mon})
  +	    end
  +    end.
  +
  +
  +
  +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  +
  +%% This is the most basic of tests.
   %% We create a listen socket, then spawn client process(es) that create
   %% monitors to it...
  -socket_monitor1_many(Config) when is_list(Config) ->
  -    ?TC_TRY(socket_monitor1_many,
  -            fun() -> do_socket_monitor1_many(Config) end).
  -
  -do_socket_monitor1_many(Config) ->
  +socket_monitor1_manyc(Config) when is_list(Config) ->
  +    ?TC_TRY(socket_monitor1_manyc,
  +            fun() -> do_socket_monitor1_manyc(Config) end).
  +
  +do_socket_monitor1_manyc(Config) ->
       ?P("begin"),
       Self         = self(),
       Type         = ?SOCKET_TYPE(Config),
  
positive.code:     Self         = self(),
      {OwnerPid, OwnerMon} =
  	spawn_monitor(fun() ->
  			      {ok, L} = ?LISTEN(Config),
  			      Self ! {socket, L},
  			      receive
  				  {Self, die} ->
  				      exit(normal)
  
negative.code:     Type         = ?SOCKET_TYPE(Config),
      {ok, LSock1} = ?LISTEN(Config),
      F  = fun(S, Fun) -> spawn_monitor(fun() -> Fun(S, Self) end) end,
      F1 = fun(Socket, Parent) when is_pid(Parent) ->
  		 ?P("[client] create monitor"),
  		 MRef = inet:monitor(Socket),
  		 Parent ! {self(), ready},
  