[erlang-questions] Strange behaviour of exit(kill)
Wed Oct 7 03:51:14 CEST 2015
On Tuesday 06 October 2015 18:46:55 you wrote:
> It's all about signals and not messages. Sending a message to a process
> should *NEVER* by default kill it even if it has the same format as an
> 'EXIT' message. NEVER!. A signal is converted to a message when it arrives
> at a process which is trapping exits unless it is the 'kill' which is
> untrappable and the process always dies.
> Explicitly sending the SIGNAL with exit(Pid, kill) should unconditionally
> kill the process as should dying with the reason 'kill' in exit(kill) which
> also sends the SIGNAL 'kill'. In both cases the process receives the SIGNAL
> 'kill', as shown in my example, but in one case it is trappable and in the
> other it is untrappable.
I didn't realize it was propagating the signal in addition to the message. That's even more weird then.
More information about the erlang-questions