D5547: Prevent kcheckpass from becoming an orphan
noreply at phabricator.kde.org
Sun Apr 23 08:35:57 UTC 2017
graesslin created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
With the long running kcheckpass there is the possibility that
kcheckpass becomes an orphan. Kcheckpass terminates once it gets
SIGUSR2 sent from the parent process (that is kscreenlocker_greet).
If kscreenlocker_greet crashes it cannot send SIGUSR2 to kcheckpass and
thus kcheckpass becomes an orphan. This can easily be seen in the
killTest autotest which results in many orphaned kcheckpass processes
This change uses the linux specific PR_SET_PDEATHSIG to send SIGUSR2 to
kcheckpass when the parent process dies. Thus kcheckpass can get out of
the waiting and terminate without becoming an orphan.
In this case it is not a problem to use a linux specific syscall. The
long running kcheckpass is only used if kscreenlocker is built with
seccomp support which is also linux specific.
Run killTest and check the number of orphaned kcheckpass.
Without this change we had 17 orphaned processes, with this change none.
To: graesslin, #plasma
Cc: plasma-devel, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Plasma-devel