<table><tr><td style="">chinmoyr added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10824">View Revision</a></tr></table><br /><div><div><p>I haven't yet tried your patch (which btw involves the http ioslave right?) but I am quite sure that exit() is not called for file ioslave after interrupting the application. I have placed the debug statements inside exit() as well as before every exit() call and I am not seeing any output.</p>

<p>That aside here's what I have observed till now,<br />
After IdleSlave is created, inside <tt style="background: #ebebeb; font-size: 13px;">dispatchLoop()</tt> SlaveBase waits in this line</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (d->appConnection.hasTaskAvailable() || d->appConnection.waitForIncomingTask(ms)) {</pre></div>

<p>with <tt style="background: #ebebeb; font-size: 13px;">appConnection</tt> having no tasks available.<br />
After deleting the IdleSlave <tt style="background: #ebebeb; font-size: 13px;">waitForIncomingTask</tt> returns false because the <tt style="background: #ebebeb; font-size: 13px;">Connection</tt> object in IdleSlave was destroyed which interrupted the connection and  changed the socket state from <tt style="background: #ebebeb; font-size: 13px;">QAbstractSocket::ConnectedState</tt> (It's merely a speculation. I haven't verified it yet). Then the variable <tt style="background: #ebebeb; font-size: 13px;">ret</tt> is assigned -1. Since the connection was interrupted, SlaveBase returns from <tt style="background: #ebebeb; font-size: 13px;">dispatchLoop</tt> and in <tt style="background: #ebebeb; font-size: 13px;">FileProtocol</tt> kdemain returns thus terminating the process.</p>

<p>Please fill me in if you think I have missed something.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R303 KInit</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10824">https://phabricator.kde.org/D10824</a></div></div><br /><div><strong>To: </strong>chinmoyr, dfaure, Frameworks<br /><strong>Cc: </strong>Frameworks, michaelh<br /></div>