[erlang-questions] Exit signals are funny things
Wed May 3 15:03:53 CEST 2017
1> Pid = spawn_link(fun() -> timer:sleep(infinity) end).
2> exit(Pid, normal).
4> exit(Pid, die).
** exception exit: die
I spawn_link a process which is not trapping and send it the signal
'normal' which it ignores. As it should. I then send it the signal 'die'
and it crashes. As it should.
5> exit(self(), normal).
** exception exit: normal
Now I send myself the signal 'normal' and I die! So there is 'normal' and
there is 'normal' depending on to whom I send it.
Where's the logic in that?
P.S. More to come
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions