Hi!<div><br></div>By example I have the follow chain:<br><div><br></div>x_sup -> x:start_link -><div>               {ok, YPid} = y:start_link(self())</div><div>                                   {ok, ZPid} = z:start_link(self())</div><div><br></div><div>So, X knows only YPid, Y knows both XPid and ZPid, Z knows only YPid. All processes are gen_servers. How to terminate the whole chain of the processes when any process can terminate with 'normal' reason?</div><div><br></div><div>I have only two ideas:</div><div>- trap_exit, catch EXIT message and terminate</div><div>- call gen_server(XPid|YPid|ZPid) from terminate callback in every process, but it causes 'little temporary' deadlock.</div><br><br>-- <br><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 914 8 820 815<div><br></div></div></div><br>