Bug 18625

Summary: system-tools-backends leaves a stale PID file when terminating
Product: system-tools-backends Reporter: Chris Coulson <chrisccoulson>
Component: initAssignee: Carlos Garnacho Parro <carlosg>
Status: RESOLVED FIXED QA Contact: Carlos Garnacho Parro <carlosg>
Severity: minor    
Priority: low    
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: cleanup-pid-file.patch

Description Chris Coulson 2008-11-19 12:49:37 UTC
I reported this at https://bugs.launchpad.net/ubuntu/+source/system-tools-backends/+bug/298777:

If I try to stop system-tools-backends after it was already stopped, I get an error. For example, if I run "sudo invoke-rc.d system-tools-backends" twice, I get:

chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends [ OK ]
chr1s@chris-desktop:~$ sudo invoke-rc.d system-tools-backends stop
 * Stopping System Tools Backends system-tools-backends start-stop-daemon: warning: failed to kill 7993: No such process
                                                                                    [ OK ]

This is because when I closed system-tools-backends the first time, it left a stale PID file in /var/run. Manually deleting /var/run/system-tools-backends.pid prevented the init script from failing again.
Comment 1 Chris Coulson 2008-11-19 12:54:45 UTC
Created attachment 20453 [details] [review]
cleanup-pid-file.patch

Here is the patch applied in Ubuntu. This applied to version 2.6.0 of system-tools-backends
Comment 2 Michael Hasselmann 2009-01-16 07:00:14 UTC
The original problem might have been caused by http://bugs.freedesktop.org/show_bug.cgi?id=19604 as the PID file was created without an explicit file mode.
Comment 3 Milan Bouchet-Valat 2009-08-19 02:06:03 UTC
Pushed as 52b2419d4ad8641c3dd63272f6c1ca97f570bf45. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.