diff options
author | Andrei Vagin <avagin@gmail.com> | 2019-01-02 10:06:41 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2019-04-21 06:25:26 +0300 |
commit | 5c71e3e028ebc7669ad0e00bc8fbbb4e41c7a5b9 (patch) | |
tree | 307e3a3033b9b6d333a487004fbdf2485b90b7f9 /test | |
parent | 034fc1424fa32dd4b2a436f3ac216e121eb7eef0 (diff) |
test/inhfd: redirect stdin to /dev/null
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/zdtm.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/zdtm.py b/test/zdtm.py index 9b88cee11..5e19d9a90 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -622,7 +622,9 @@ class inhfd_test: fd = os.open(self.__name + ".out", os.O_WRONLY | os.O_APPEND | os.O_CREAT) os.dup2(fd, 1) os.dup2(fd, 2) - os.close(0) + os.close(fd) + fd = os.open("/dev/null", os.O_RDONLY) + os.dup2(fd, 0) for my_file, _ in self.__files: my_file.close() os.close(start_pipe[0]) |