monitor vs link
Mon Apr 4 09:51:29 CEST 2005
> Hi Gurus,
> Could you please explain the difference between
> erlang:monitor(process, Pid) and link(Pid) + process_flag(trap_exit,
erlang:monitor/2 is one way. it allows your process to find out when Pid
exits, without telling Pid if your process exits.
erlang:link/1 is two way. your process finds out about when Pid exits,
and Pid finds out about your process exit.
More information about the erlang-questions