1
0
Fork 0

make pid dir

This commit is contained in:
Jan Kaluza 2012-03-12 12:39:51 +01:00
parent 3e2581e63c
commit f8fdb488df

View file

@ -58,7 +58,8 @@ def _daemonize_fork(timeout, pidfile):
os.dup2(se.fileno(), sys.stderr.fileno())
try:
#os.makedirs(os.path.dirname(pidfile))
if not os.path.exists(os.path.dirname(pidfile)):
os.makedirs(os.path.dirname(pidfile))
with open(pidfile, "w") as f:
f.write(str(os.getpid()))
except (OSError,IOError) as e: