# # Ubuntu: https://bugs.launchpad.net/ubuntu/+source/system-tools-backends/+bug/298777 # Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=18625 # Description: Patch to make S-T-B delete it's PID file when terminated # Index: system-tools-backends-2.6.0/dispatcher/main.c =================================================================== --- system-tools-backends-2.6.0.orig/dispatcher/main.c 2008-11-16 17:25:20.000000000 +0000 +++ system-tools-backends-2.6.0/dispatcher/main.c 2008-11-16 17:25:30.000000000 +0000 @@ -59,6 +59,12 @@ close (dev_null_fd); } +static void +remove_pidfile (void) +{ + unlink (LOCALSTATEDIR "/run/system-tools-backends.pid"); +} + void signal_received (gint signal) { @@ -67,6 +73,7 @@ case SIGTERM: case SIGABRT: g_object_unref (dispatcher); + remove_pidfile (); exit (0); break; default: