catch link(Pid) when trapping exits

Francesco Cesarini (Erlang Training & Consulting) francesco@REDACTED
Wed Oct 26 22:46:16 CEST 2005

In a process trapping exists,

catch link(Pid)

of a non existing pid returns true. If we are not trapping exists, the 
return value is {'EXIT', {noproc, .....}}

Looking into this "feature", my guess is that executing exit(Pid, 
Reason) when trapping exists returns true. I would however expect the 
same behavior in both cases, however....

11> catch exit(hello).
12> catch exit(self(), hello).
13> flush().
Shell got {'EXIT',<0.44.0>,hello}

Is this a bug or a feature?


More information about the erlang-questions mailing list