summaryrefslogtreecommitdiff
path: root/lib/ansible/executor/process
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2021-04-06 18:26:52 +0200
committerGitHub <noreply@github.com>2021-04-06 11:26:52 -0500
commit96f94c0fef18cf25f772a2b241b9c4ce9ab9b74e (patch)
tree9025418cdcb631cf2b1cda923f605f4b4604bac5 /lib/ansible/executor/process
parentd1842afd59ea087b0d2c5081d1c6cbc295c57aba (diff)
downloadansible-96f94c0fef18cf25f772a2b241b9c4ce9ab9b74e.tar.gz
Use a file-like obj for stdout/stderr for deadlock workaround (#74156)
Fixes #74149
Diffstat (limited to 'lib/ansible/executor/process')
-rw-r--r--lib/ansible/executor/process/worker.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ansible/executor/process/worker.py b/lib/ansible/executor/process/worker.py
index 983df45bca..510928c0ed 100644
--- a/lib/ansible/executor/process/worker.py
+++ b/lib/ansible/executor/process/worker.py
@@ -145,8 +145,7 @@ class WorkerProcess(multiprocessing_context.Process):
# TODO: Evaluate overhauling ``Display`` to not write directly to stdout
# and evaluate migrating away from the ``fork`` multiprocessing start method.
if sys.version_info[0] >= 3:
- sys.stdout = os.devnull
- sys.stderr = os.devnull
+ sys.stdout = sys.stderr = open(os.devnull, 'w')
def _run(self):
'''