[system-tools-backends-clone] bfo#18625 - Remove stale PID file when terminating
- From: Milan Bouchet-Valat <milanbv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [system-tools-backends-clone] bfo#18625 - Remove stale PID file when terminating
- Date: Wed, 19 Aug 2009 09:06:01 +0000 (UTC)
commit 52b2419d4ad8641c3dd63272f6c1ca97f570bf45
Author: Chris Coulson <chrisccoulson googlemail com>
Date: Wed Aug 19 11:03:06 2009 +0200
bfo#18625 - Remove stale PID file when terminating
Patch used downstream by Ubuntu.
dispatcher/main.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/dispatcher/main.c b/dispatcher/main.c
index 0448b5e..e4318bc 100644
--- a/dispatcher/main.c
+++ b/dispatcher/main.c
@@ -61,6 +61,12 @@ daemonize (void)
close (dev_null_fd);
}
+static void
+remove_pidfile (void)
+{
+ unlink (LOCALSTATEDIR "/run/system-tools-backends.pid");
+}
+
void
signal_received (gint signal)
{
@@ -69,6 +75,7 @@ signal_received (gint signal)
case SIGTERM:
case SIGABRT:
g_object_unref (dispatcher);
+ remove_pidfile ();
exit (0);
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]