From: Jonathan Barber Date: Fri, 5 Sep 2008 18:09:35 +0000 (-0400) Subject: close stdin/stdout/stderr on daemonize X-Git-Tag: v0.24~8 X-Git-Url: https://pwan.org/git/?a=commitdiff_plain;h=d512d680d6fb50cdeae615492fb35741d44bd3a4;p=certmaster.git close stdin/stdout/stderr on daemonize patch from Jonathan Barber --- diff --git a/certmaster/utils.py b/certmaster/utils.py index 61721ac..22b0afb 100755 --- a/certmaster/utils.py +++ b/certmaster/utils.py @@ -48,6 +48,10 @@ def daemonize(pidfile=None): pid = os.fork() if pid > 0: sys.exit(0) + os.close(0) + os.close(1) + os.close(2) + os.cwd("/") os.setsid() os.umask(0) pid = os.fork()