<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 2:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">Why not simply sending some signal() to the process itself and let usual SIGINT or alike take the usual exit path?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I've tried it, but found that it doesn't nicely service the pending writes before quitting, at least with the programs I've tested. So I did a combination of both that doesn't need setting the variable in every loop.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I would really avoid having a separate shutdown procedure/steps done when triggering by VTY. If the app doesn't support proper shutdown in usual case, I think it's dangerous doing so through VTY. So I'd vote for going the way I mentioned (sending signal SIGTERM or similar), and if specific apps don't behave as expected, then fix the usual shutdown path (SIGTERM or alike, usually sent by user or systemd).</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24926">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/24926">change 24926</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/24926"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3596a35b0f4a24e49484ec3f24a98e4d4f583e1e </div>
<div style="display:none"> Gerrit-Change-Number: 24926 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 13 Jul 2021 11:30:40 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>