<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I am a bit in doubt about what would be the cleanest way to stop a part of my supervision tree.<br><br></div>The tree looks like this:<br></div><font face="monospace">top_sup<br></font></div><font face="monospace">  ├─ master<br></font></div><font face="monospace">  └─ worker_sup<br></font></div><font face="monospace">       <font face="monospace">└─ worker<br><br></font></font></div><font face="monospace"><font face="sans-serif">I have multiple instances of the top_sup supervisor, one for each master. <br>So when I need to stop a master and all its workers I would have to stop its top_sup and everything below it.<br><br></font></font></div><div><font face="monospace"><font face="sans-serif">Controlled stopping needs to be different from a crash as a controlled stop should remove some persistent data for the master and workers.<br><br></font></font></div><div><font face="monospace"><font face="sans-serif">Should I just do an exit(top_sup, normal) for the controlled stop? <br></font></font></div><div><font face="monospace"><font face="sans-serif">Or should I implement a stop function all the way down?<br></font></font></div><div><font face="monospace"><font face="sans-serif">Are there any subtleties that I need to cater for? Have I given enough information for this question to make sense?<br></font></font></div><div><font face="monospace"><font face="sans-serif"><br></font></font></div><div><font face="monospace"><font face="sans-serif">Either will do the job. Just wondering what experience others have on this.<br><br></font></font></div><div><font face="monospace"><font face="sans-serif">Cheers,<br></font></font></div><div><font face="monospace"><font face="sans-serif">Torben<br></font></font></div><font face="monospace"><font face="sans-serif"></font></font><div><div><div><div><font face="monospace"><br></font></div></div></div></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><a href="https://www.linkedin.com/in/torbenhoffmann/">https://www.linkedin.com/in/torbenhoffmann/</a><br></div></div>