[erlang-questions] Some problem abount exit signal?

Robert Virding <>
Tue Dec 7 00:23:22 CET 2010


----- "Ulf Wiger" <> wrote:

> On 5 Dec 2010, at 19:49, Robert Virding wrote:
> 
> > I was thinking more about the effect I have on *other* processes
> when
> > I send them a 'kill' signal. The effect depends on *how* I send
> them
> > signal and not on the signal: if I kill myself with 'kill' it is
> > trappable and affects them as any other non-'normal' signal while if
> I
> > send it to them with an exit/2 it is untrappable. I think other
> > processes should be affected in the same way if they get a 'kill'
> > signal irrespective of how I sent it to them.
> 
> …but a supervisor must be able to trap an EXIT propagated to it
> from a process terminated with a kill signal. Otherwise, killing a 
> supervised process in an application supervision tree would 
> inevitably lead to the termination of the whole node.

I am not saying that a process who gets killed with a 'kill' signal should resignal 'kill', that would never work. I should signal 'killed' as it does now. All I am saying is that when a process *receives* a 'kill' signal there should be only ONE behaviour, it should untrappably die and signal 'killed' to its link set. Now it may or may not be able to trap the signal depending on how it was generated. In effect, there are two different signals with the same name.

Robert

-- 
Robert Virding, Erlang Solutions Ltd.


More information about the erlang-questions mailing list