<table><tr><td style="">graesslin created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</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/D5547" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>With the long running kcheckpass there is the possibility that<br />
kcheckpass becomes an orphan. Kcheckpass terminates once it gets<br />
SIGUSR2 sent from the parent process (that is kscreenlocker_greet).</p>

<p>If kscreenlocker_greet crashes it cannot send SIGUSR2 to kcheckpass and<br />
thus kcheckpass becomes an orphan. This can easily be seen in the<br />
killTest autotest which results in many orphaned kcheckpass processes<br />
after execution.</p>

<p>This change uses the linux specific PR_SET_PDEATHSIG to send SIGUSR2 to<br />
kcheckpass when the parent process dies. Thus kcheckpass can get out of<br />
the waiting and terminate without becoming an orphan.</p>

<p>In this case it is not a problem to use a linux specific syscall. The<br />
long running kcheckpass is only used if kscreenlocker is built with<br />
seccomp support which is also linux specific.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Run killTest and check the number of orphaned kcheckpass.<br />
Without this change we had 17 orphaned processes, with this change none.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R133 KScreenLocker</div></div></div><br /><div><strong>BRANCH</strong><div><div>kcheckpass-no-orphan</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5547" rel="noreferrer">https://phabricator.kde.org/D5547</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcheckpass/kcheckpass.c</div></div></div><br /><div><strong>To: </strong>graesslin, Plasma<br /><strong>Cc: </strong>plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>