Skip to content

Commit

Permalink
Distinguish orderly exit of the supervised process
Browse files Browse the repository at this point in the history
  • Loading branch information
saleyn committed Mar 8, 2017
1 parent aef07f1 commit d241886
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/exec.erl
Expand Up @@ -880,6 +880,10 @@ ospid_loop({Pid, OsPid, Parent, StdOut, StdErr, IsMon, Debug} = State) ->
0 -> notify_and_exit(IsMon, Pid, OsPid, normal);
_ -> notify_and_exit(IsMon, Pid, OsPid, {exit_status, Status})
end;
{'EXIT', Pid, Reason} when Reason =:= normal; Reason =:= shutdown ->
% orderly exit
debug(Debug, "~w ~w got ~w exit from linked ~w\n", [self(), OsPid, Reason, Pid]),
exit(Reason);
{'EXIT', Pid, Reason} ->
% Pid died
debug(Debug, "~w ~w got exit from linked ~w: ~p\n", [self(), OsPid, Pid, Reason]),
Expand Down

0 comments on commit d241886

Please sign in to comment.