anchor.diff:  handle_msg({Port, closed}, _Proc, Sh=#sh{id=Id, port=Port}) ->
       log({framework, Id}, "~p closed~n", [Port]),
       {stop, {port_closed, Port}, Sh};
  -handle_msg({'EXIT', Pid, {ok, StopAcc}}, _Proc, Sh=#sh{shutdown_port=Pid,
  -                                                       detached=Detached,
  -                                                       state=killed,
  -                                                       log=Fd,
  -                                                       id=Id}) ->
  +handle_msg({'EXIT', Pid, {ok, StopAcc}}, _Proc,
  +            Sh=#sh{shutdown_port=SPort,
  +                   detached=Detached,
  +                   state=State,
  +                   log=Fd,
  +                   id=Id}) when Pid == SPort andalso
  +                                ?IS_DYING(State) ->
       log({framework, Id}, "termination Port completed ok~n"),
       io:format(Fd, "Halt Log ==============~n~s~n", [StopAcc]),
       case Detached of
  
positive.code:         false -> Sh
      end;
  handle_msg({'EXIT', Pid, {error, Rc, StopAcc}},
             _Proc, Sh=#sh{id=Id, shutdown_port=Pid, log=Fd}) ->
      log({framework, Id},
          "termination Port stopped abnormally (status ~p)~n", [Rc]),
      io:format(Fd, "Halt Log ==============~n~s~n", [StopAcc]),
  
negative.code:     log({framework, Id},
          "os process ~p shut down with error/status code ~p~n",
          [Proc#proc.id, Exit]),
      ShutdownType = case ?IS_DYING(State) of
                         true  -> normal;
                         false -> Rc
                     end,
      {stop, ShutdownType, Sh};
  handle_msg({Port, closed}, Proc,
              Sh=#sh{id=Id, port=Port,
                     state=State, detached=false}) when ?IS_DYING(State) ->
      log({framework, Id}, "~p (attached) closed~n", [Port]),
      case Sh#sh.rpc_enabled of
          true ->
              %% to account for a potential timing issue when the calling test
              %% execution process is sitting in `kill_and_wait` - we force a
              %% call to net_adm:ping/1, which gives the net_kernel more time to
              %% to try and its knickers out of a twist before proceeding....
              Id = systest_proc:get(id, Proc),
              systest_proc:status_check(Id);
          false ->
  