From 82bc69181956d577250d19894d325bb9f1aaca79 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 22 May 2011 20:07:14 +0200 Subject: [PATCH] Write pid before resetting umask --- src/daemon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon.py b/src/daemon.py index 787cb65..7489233 100644 --- a/src/daemon.py +++ b/src/daemon.py @@ -59,7 +59,6 @@ class Daemon(object): sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) sys.exit(1) - self.write_pid() # redirect standard file descriptors sys.stdout.flush() sys.stderr.flush() @@ -114,6 +113,7 @@ class Daemon(object): sys.stderr.write(message % self.pidfile) sys.exit(1) + self.write_pid() # Start the daemon self.daemonize() self.run() -- 2.39.5