<div dir="ltr"><div>Sigh, that means someone has been "thinking".<br><br></div>Robert<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 May 2017 at 18:05, Ben Murphy <span dir="ltr"><<a href="mailto:benmmurphy@gmail.com" target="_blank">benmmurphy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well its a very deliberate decision by someone.<br>
<br>
erts/emulator/beam/bif.c:<br>
<br>
erts_send_exit_signal(BIF_P,<br>
BIF_P-><a href="http://common.id" rel="noreferrer" target="_blank">common.id</a>,<br>
rp,<br>
&rp_locks,<br>
BIF_ARG_2,<br>
NIL,<br>
NULL,<br>
BIF_P == rp ? ERTS_XSIG_FLG_NO_IGN_NORMAL : 0);<br>
<br>
It sends ERTS_XSIG_FLG_NO_IGN_NORMAL if you are sending a signal to yourself.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, May 3, 2017 at 2:03 PM, Robert Virding <<a href="mailto:rvirding@gmail.com">rvirding@gmail.com</a>> wrote:<br>
> So:<br>
><br>
> 1> Pid = spawn_link(fun() -> timer:sleep(infinity) end).<br>
> <0.59.0><br>
> 2> exit(Pid, normal).<br>
> true<br>
> 3> flush().<br>
> ok<br>
> 4> exit(Pid, die).<br>
> ** exception exit: die<br>
><br>
> I spawn_link a process which is not trapping and send it the signal 'normal'<br>
> which it ignores. As it should. I then send it the signal 'die' and it<br>
> crashes. As it should.<br>
><br>
> Now:<br>
><br>
> 5> exit(self(), normal).<br>
> ** exception exit: normal<br>
><br>
> Now I send myself the signal 'normal' and I die! So there is 'normal' and<br>
> there is 'normal' depending on to whom I send it.<br>
><br>
> Where's the logic in that?<br>
><br>
> Robert<br>
><br>
> P.S. More to come<br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> ______________________________<wbr>_________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
><br>
</div></div></blockquote></div><br></div>