Skip to content

Commit 652b8f5

Browse files
committed
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.
1 parent a0e7438 commit 652b8f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qrexec/tests/socket/agent.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,10 @@ def test_service_close_stdout_stderr_early(self):
938938
#!/bin/sh
939939
read
940940
echo closing stdout
941-
exec >&-
941+
exec >/dev/null
942942
read
943943
echo closing stderr >&2
944-
exec 2>&-
944+
exec 2>/dev/null
945945
read code
946946
exit $code
947947
""",
@@ -1028,7 +1028,7 @@ def test_close_stdin_early(self):
10281028
target, dom0 = self.execute(
10291029
"""
10301030
read
1031-
exec <&-
1031+
exec </dev/null
10321032
echo "closed stdin"
10331033
sleep 1
10341034
"""

0 commit comments

Comments
 (0)