SV: Killing Supervisor

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Fri Apr 28 13:31:00 CEST 2006

Samuel Rivas wrote:
>   - exit(Pid, kill) sends Pid an exit signal that cannot be 
> trapped, so the supervisor dies instantaneously and the exit
> signal propagates to its children since they are linked.
> Children die in an unspecified order.

Just to be clear: {'EXIT', Pid, kill} messages are converted to
{'EXIT', Pid, killed} when they propagate to linked processes.
It is only the original kill that is untrappable.

Supervisors and OTP behaviours always terminate if the parent
terminates (unless the link is removed for some reason.)

If reason is anything other than normal or shutdown, a crash
report is generated.

Note also that the behaviours know which process is the parent,
so they are not so easily fooled. That's one reason why the 
first exit might need to be exit(Top, kill) in some cases.

/Ulf W

More information about the erlang-questions mailing list