From 652b8f59084735968f9e74f0aa97b6709e861da2 Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Thu, 11 Apr 2024 21:47:36 -0400 Subject: [PATCH] Do not close stdin, stdout, or stderr Instead, point them at /dev/null. Closing standard file descriptors is almost always a bug, and in this case causes a hang in the tests. --- qrexec/tests/socket/agent.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qrexec/tests/socket/agent.py b/qrexec/tests/socket/agent.py index eb351719..c76b4559 100644 --- a/qrexec/tests/socket/agent.py +++ b/qrexec/tests/socket/agent.py @@ -938,10 +938,10 @@ def test_service_close_stdout_stderr_early(self): #!/bin/sh read echo closing stdout -exec >&- +exec >/dev/null read echo closing stderr >&2 -exec 2>&- +exec 2>/dev/null read code exit $code """, @@ -1028,7 +1028,7 @@ def test_close_stdin_early(self): target, dom0 = self.execute( """ read -exec <&- +exec