From 24b22a84c7196c0a8e0d2d734286998a093a282d Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Mon, 23 Dec 2024 00:51:35 +0100 Subject: [PATCH] only add stdin to non-blocking channels if there is content for it --- easybuild/tools/run.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/tools/run.py b/easybuild/tools/run.py index 4f83acd9c3..c327930a8d 100644 --- a/easybuild/tools/run.py +++ b/easybuild/tools/run.py @@ -514,9 +514,12 @@ def to_cmd_str(cmd): if qa_patterns: # make stdout, stderr, stdin non-blocking files - channels = [proc.stdout, proc.stdin] + channels = [proc.stdout] + if stdin: + channels.append(proc.stdin) if split_stderr: - channels += proc.stderr + channels.append(proc.stderr) + for channel in channels: fd = channel.fileno() flags = fcntl.fcntl(fd, fcntl.F_GETFL)