Reputation: 1777
Besides avoiding propagated kills, is there any advantage to monitoring over just trapping exits?
Upvotes: 5
Views: 809
Reputation: 8340
There is never more than one link between two processes, while there can be several nested monitors.
10 seconds of googling... :-)
Upvotes: 1
Reputation: 20024
Unlike trapping exits, monitoring allows you to easily keep tabs on processes that you have not spawned, and without having to trap exits. Also, links are bidirectional, so if you link to some process but you die first and it's not trapping exits, it dies too. Monitoring prevents this unintended coupling.
Upvotes: 11