anchor.diff:      {ok, S} = gen_tcp:accept(L),
       inet:setopts(S, [{active, 10}]),
       ?P("start collecting data"),
  -    RecvSize =
  -        (fun Server(Size) ->
  -                 receive
  -                     {tcp, S, Bin} ->
  -                         %% ?P("got a chunk (~w) of data", [byte_size(Bin)]),
  -                         Server(byte_size(Bin) + Size);
  -                     {tcp_closed, S} ->
  -                         ?P("got closed -> we are done: ~w", [Size]),
  -                         Size;
  -                     {tcp_passive, S} ->
  -                         %% ?P("got passive -> active"),
  -                         inet:setopts(S, [{active, 10}]),
  -                         Server(Size);
  -                     Msg ->
  -                         ?P("ignore: ~p", [Msg]),
  -                         Server(Size)
  -                 end
  -         end)(0),
  -
  -    ?P("await client process termination"),
  -    receive
  -        {'DOWN', MRef, process, Pid, ok} ->
  -            ok;
  -        {'DOWN', MRef, process, Pid, CloseRes} ->
  -            exit({unexpected, close, CloseRes})
  -    end,
  +    RecvSize = anc_await_closed_and_down(S, Pid, MRef),
  +    %% {RecvSize, Down} =
  +    %%     (fun Server(Size) ->
  +    %%              receive
  +    %%                  {tcp, S, Bin} ->
  +    %%                      %% ?P("got a chunk (~w) of data", [byte_size(Bin)]),
  +    %%                      Server(byte_size(Bin) + Size);
  +    %%                  {tcp_closed, S} ->
  +    %%                      ?P("got closed -> we are done: ~w", [Size]),
  +    %%                      Size;
  +    %%                  {tcp_passive, S} ->
  +    %%                      %% ?P("got passive -> active"),
  +    %%                      inet:setopts(S, [{active, 10}]),
  +    %%                      Server(Size);
  +    %%                  {'DOWN', MRef, process, Pid, Reason} ->
  +    %%                      ?P("Received UNEXPECTED down message regarding client:"
  +    %%                         "~n   Reason: ~p"
  +    %%                         "~n   S:      ~p"
  +    %%                         "~n   Port Info: ~p",
  +    %%                         [Reason, ]),
  +    %%                      ct:fail({unexpected_client_down, Reason});
  +    %%                  Msg ->
  +    %%                      ?P("ignore: ~p", [Msg]),
  +    %%                      Server(Size)
  +    %%              end
  +    %%      end)(0),
  +    %% ?P("await client process termination"),
  +    %% receive
  +    %%     {'DOWN', MRef, process, Pid, ok} ->
  +    %%         ok;
  +    %%     {'DOWN', MRef, process, Pid, CloseRes} ->
  +    %%         exit({unexpected, close, CloseRes})
  +    %% end,
   
       ?P("close listen socket"),
       gen_tcp:close(L),
  
positive.code: 
      ClientF =
          fun() ->
                  Payload = <<0:50000/unit:8>>,
                  Cnt = 10000,
                  P ! {size, Cnt * byte_size(Payload)},
                  S = case gen_tcp:connect("localhost", Port,
                                           [binary, {active, false}]) of
                          {ok, CS} ->
                              P ! {continue, self()},
                              CS;
                          {error, eaddrnotavail = Reason} ->
                              ?SKIPE(connect_failed_str(Reason))
                      end,
                  _ = [gen_tcp:send(S, Payload) || _ <- lists:seq(1, Cnt)],
                  gen_tcp:close(S),
                  %% Try to "ensure" that teh close get there before the DOWN...
                  receive after 1000 -> ok end,
                  exit(ok)
          end,
      ?P("create client process"),
  
negative.code: 
  %% Check that active n and tcp_close messages behave as expected.
  active_n_closed(Config) when is_list(Config) ->
      ?TC_TRY(active_n_closed, fun() -> do_active_n_closed(Config) end).
  
  do_active_n_closed(_Config) ->
      ?P("create listen socket"),
  