Bug 18625 - system-tools-backends leaves a stale PID file when terminating
Summary: system-tools-backends leaves a stale PID file when terminating
Status: RESOLVED FIXED
Alias: None
Product: system-tools-backends
Classification: Unclassified
Component: init (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: low minor
Assignee: Carlos Garnacho Parro
QA Contact: Carlos Garnacho Parro
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-19 12:49 UTC by Chris Coulson
Modified: 2009-08-19 02:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
cleanup-pid-file.patch (878 bytes, patch)
2008-11-19 12:54 UTC, Chris Coulson
Details | Splinter Review

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.