Don't change to root dir in async_wrapper (#4779)

The daemonizing code here is taken from an ActiveState recipe, which
includes changing to / as a general best practice. While that is
normally true to allow for deleting the directory that the daemon
process started in, in this case it is not relevant as this is not
intended to be an actual long-running daemon.

Issue ansible/ansible#17466
reviewable/pr18780/r1
Monty Taylor 8 years ago committed by Brian Coca
parent dc7ba8f3c9
commit 6ba5dc3188

@ -52,7 +52,6 @@ def daemonize_self():
sys.exit("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) sys.exit("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror))
# decouple from parent environment # decouple from parent environment
os.chdir("/")
os.setsid() os.setsid()
os.umask(int('022', 8)) os.umask(int('022', 8))

Loading…
Cancel
Save