[erlang-questions] Some problem abount exit signal?

Robert Virding robert.virding@REDACTED
Sun Dec 5 18:50:20 CET 2010


----- "Ulf Wiger" <ulf.wiger@REDACTED> wrote:

> On 5 Dec 2010, at 04:02, Frédéric Trottier-Hébert wrote:
> 
> > 
> > I'm not sure this can entirely be a bug. See the following: 
> > 
> > 1> catch exit(hah).
> > {'EXIT',hah}
> > 2> catch exit(self(), hah).
> > ** exception exit: hah
> > 
> > In this case, exit/1 is trappable, while exit/2 is not. They already
> behave differently depending on whether they are 'internal' (exit/1)
> or 'external' (exit/2). I don't see it as too extravagant to have one
> kind of kill behaving differently than the other in that context.
> 
> 
> Bug or not, I think the difference between exit/1 and exit/2 should be
> documented.
> 
> Specifically, I guess the interpretation is that the atom 'kill' is
> _only_
> special when used as second argument to exit/2.

Originally exit/2 was described as sending a signal to a process *as if* the calling process had died and they were linked. That being the case there should be no difference. It is not described like that in the current documentation.

I just find it confusing and illogical that it is significant HOW the signal is sent. It means that actually there are two signals with the same name. I don't know what happens over distribution.

Robert

-- 
Robert Virding, Erlang Solutions Ltd.


More information about the erlang-questions mailing list