Hi the question is as following:
Assume we have processes A and B which are linked. Process’s A flag trap_exit is set to true. Let B process send a msg to A and then exit:
PidA ! 'msg',
exit(reason).
What I wanna know if we can be shure that the process A will receive ‘msg’ and only after It {‘EXIT’, Pid, reason} will come ? Can we predict the ordering of msgs? I can’t found any proofs in documentation, but I guess that it will work that way, but I need some proofs. Don’t want to have race condition here..
As to not leave this question hanging. This is the discussion in erlang-questions mailing list:
http://thread.gmane.org/gmane.comp.lang.erlang.general/66788
Long story short: all messages are signals (or all signals are messages), exits are seen as messages from the process, guaranteed to arrive in the same order they were sent.