Fix the PID number stored on filesystem

This commit is contained in:
Guillaume Ayoub 2014-08-07 12:31:51 +02:00
parent f90bb516a5
commit 77ad16f2a9

View File

@ -105,7 +105,7 @@ def run():
if pid: if pid:
sys.exit() sys.exit()
elif config.get("server", "pid"): elif config.get("server", "pid"):
open(config.get("server", "pid"), "w").write(str(pid)) open(config.get("server", "pid"), "w").write(str(os.getpid()))
sys.stdout = sys.stderr = open(os.devnull, "w") sys.stdout = sys.stderr = open(os.devnull, "w")
# Register exit function # Register exit function