anchor.diff:                     end},
            #{desc => "order handler 1 to terminate",
              cmd  => fun(#{handler1 := Pid} = _State) ->
  -                           Pid ! {terminate, self(), ok},
  +                           %% Pid ! {terminate, self(), ok},
  +                           ?SEV_ANNOUNCE_TERMINATE(Pid),
                              ok
                      end},
            #{desc => "await handler 1 termination",
              cmd  => fun(#{handler1 := Pid} = State) ->
  -                           receive
  -                               {'DOWN', _, process, Pid, _} ->
  -                                   State1 = maps:remove(csock1,   State),
  -                                   State2 = maps:remove(handler1, State1),
  -                                   {ok, State2}
  -                           end
  +                           ?SEV_AWAIT_TERMINATION(Pid),
  +                           State1 = maps:remove(csock1,   State),
  +                           State2 = maps:remove(handler1, State1),
  +                           {ok, State2}
                      end},
            #{desc => "order handler 2 to terminate",
              cmd  => fun(#{handler2 := Pid} = _State) ->
  -                           Pid ! {terminate, self(), ok},
  +                           ?SEV_ANNOUNCE_TERMINATE(Pid),
                              ok
                      end},
            #{desc => "await handler 2 termination",
              cmd  => fun(#{handler2 := Pid} = State) ->
  -                           receive
  -                               {'DOWN', _, process, Pid, _} ->
  -                                   State1 = maps:remove(csock2,   State),
  -                                   State2 = maps:remove(handler2, State1),
  -                                   {ok, State2}
  -                           end
  +                           ?SEV_AWAIT_TERMINATION(Pid),
  +                           State1 = maps:remove(csock2,   State),
  +                           State2 = maps:remove(handler2, State1),
  +                           {ok, State2}
                      end},
            #{desc => "order handler 3 to terminate",
              cmd  => fun(#{handler3 := Pid} = _State) ->
  -                           Pid ! {terminate, self(), ok},
  +                           ?SEV_ANNOUNCE_TERMINATE(Pid),
                              ok
                      end},
            #{desc => "await handler 3 termination",
              cmd  => fun(#{handler3 := Pid} = State) ->
  -                           receive
  -                               {'DOWN', _, process, Pid, _} ->
  -                                   State1 = maps:remove(csock3,   State),
  -                                   State2 = maps:remove(handler3, State1),
  -                                   {ok, State2}
  -                           end
  +                           ?SEV_AWAIT_TERMINATION(Pid),
  +                           State1 = maps:remove(csock3,   State),
  +                           State2 = maps:remove(handler3, State1),
  +                           {ok, State2}
                      end},
            #{desc => "close listen socket",
              cmd  => fun(#{lsock := LSock} = State) ->
  
positive.code:                    end},
           #{desc => "order handler 1 to receive",
             cmd  => fun(#{handler1 := Pid} = _State) ->
                             Pid ! {recv, self()},
                             ok
                     end},
           #{desc => "order handler 2 to receive",
             cmd  => fun(#{handler2 := Pid} = _State) ->
                             Pid ! {recv, self()},
                             ok
                     end},
           #{desc => "order handler 3 to receive",
             cmd  => fun(#{handler3 := Pid} = _State) ->
                             Pid ! {recv, self()},
                             ok
                     end},
           #{desc => "await ready from handler 1 (recv)",
             cmd  => fun(#{handler1 := Pid} = _State) ->
                             receive
                                 {ready, Pid, ok} ->
                                     ok;
                                 {ready, Pid, Result} ->
                                     Result;
                                 {'DOWN', _, process, Pid, Reason} ->
                                     {error, {handler1_exit, Reason}}
                             end
                     end},
           #{desc => "await ready from handler 2 (recv)",
             cmd  => fun(#{handler2 := Pid} = _State) ->
                             receive
                                 {ready, Pid, ok} ->
                                     ok;
                                 {ready, Pid, Result} ->
                                     Result;
                                 {'DOWN', _, process, Pid, Reason} ->
                                     {error, {handler2_exit, Reason}}
                             end
                     end},
           #{desc => "await ready from handler 3 (recv)",
             cmd  => fun(#{handler3 := Pid} = _State) ->
                             receive
                                 {ready, Pid, ok} ->
                                     ok;
                                 {ready, Pid, Result} ->
                                     Result;
                                 {'DOWN', _, process, Pid, Reason} ->
                                     {error, {handler3_exit, Reason}}
                             end
                     end},
           #{desc => "announce ready (recv closed from all handlers)",
  
negative.code:             {error, {recv, C, E, S}}
      end.
      
  sc_rc_tcp_handler_announce_ready(Parent, Slogan, Result) ->
      ?SEV_IPRINT("announce ready"),
      ?SEV_ANNOUNCE_READY(Parent, Slogan, Result),
      ok.
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  