LightDM leaves a child X instance running when the service is stopped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Fix Released
|
High
|
Unassigned | ||
lightdm (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
When stopping the lightdm service (sudo service lightdm stop), the process doesn't clean up properly after receiving the
TERM signal and a child X instance remains running.
I tracked this down to the signal handling in child-process.c. The signals are properly received by signal_cb and written to
the pipe, but they are never emitted by the handle_signal function.
The logic in this function seems wrong somehow. Will pid ever actually be 0? When upstart sends the TERM signal, the pid
is 1, so the function tries to look that up in the process table, doesn't find it, and so never emits the signal. I am going to attach
a branch that reverses the lookup in handle_signal, first checking the hash table, and if that is NULL, then grabbing the parent.
(Since the pid could be any pid of a kill process trying to terminate lightdm, not just from pid 1)
This is for the package 0.3.5 in oneiric, however I also tested with commit 478 from the trunk.
Related branches
Changed in lightdm (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: patch |
package 0.3.5 in oneiric
At the end of the session unity all the processes are running. With gdm no such problems.