From 225f8107ec57e2f63ca6e8a58af7b64f3399a477 Mon Sep 17 00:00:00 2001 From: Marin Atanasov Nikolov Date: Thu, 12 Sep 2013 14:15:29 +0300 Subject: [PATCH] Remove the pidfile of the daemon before attempting to kill it --- src/vmpoller/daemon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vmpoller/daemon.py b/src/vmpoller/daemon.py index 160455c..ba6b222 100644 --- a/src/vmpoller/daemon.py +++ b/src/vmpoller/daemon.py @@ -159,6 +159,9 @@ def stop(self): return # Not an error in a restart + # Just for sure, remove the pidfile while we are here + os.remove(self.pidfile) + # Try killing the daemon process try: i = 0