From e27b7af1e65fc74cb7eddb33f4ace850200e7d82 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 12 Sep 2016 11:31:40 -0500 Subject: [PATCH] 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 --- lib/ansible/modules/utilities/logic/async_wrapper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ansible/modules/utilities/logic/async_wrapper.py b/lib/ansible/modules/utilities/logic/async_wrapper.py index b1adb9c5bcd..5c658d68b81 100644 --- a/lib/ansible/modules/utilities/logic/async_wrapper.py +++ b/lib/ansible/modules/utilities/logic/async_wrapper.py @@ -52,7 +52,6 @@ def daemonize_self(): sys.exit("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) # decouple from parent environment - os.chdir("/") os.setsid() os.umask(int('022', 8))