summaryrefslogtreecommitdiff
path: root/bin/ansible-connection
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ansible-connection')
-rwxr-xr-xbin/ansible-connection5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ansible-connection b/bin/ansible-connection
index e29c681815..d2d10e71c2 100755
--- a/bin/ansible-connection
+++ b/bin/ansible-connection
@@ -62,7 +62,7 @@ def do_fork():
return pid
# This is done as a 'good practice' for daemons, but we need to keep the cwd
# leaving it here as a note that we KNOW its good practice but are not doing it on purpose.
- #os.chdir("/")
+ # os.chdir("/")
os.setsid()
os.umask(0)
@@ -261,6 +261,7 @@ def communicate(sock, data):
stderr = recv_data(sock)
return (rc, stdout, stderr)
+
def main():
# Need stdin as a byte stream
if PY3:
@@ -304,7 +305,7 @@ def main():
socket_path = unfrackpath(cp % dict(directory=tmp_path))
# if the socket file doesn't exist, spin up the daemon process
- lock_fd = os.open(lock_path, os.O_RDWR|os.O_CREAT, 0o600)
+ lock_fd = os.open(lock_path, os.O_RDWR | os.O_CREAT, 0o600)
fcntl.lockf(lock_fd, fcntl.LOCK_EX)
if not os.path.exists(socket_path):