mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
test: redirect STDIN from /dev/null
Without this stdin may be anything that parent process provided for it. Test processes might have tried to read something from it, which would have caused undeterministic behavior. E.g. gdb(1) tries to do tty related ioctls on fd 0 (and fd 1 and fd 2, but those are redirected to 'test.output' before test runs).
This commit is contained in:
parent
2669117ad7
commit
f33053023b
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,9 @@ done,*)
|
|||
;;
|
||||
esac
|
||||
|
||||
# STDIN from /dev/null. EOF for readers (and ENOTTY for tty related ioctls).
|
||||
exec </dev/null
|
||||
|
||||
# Save STDOUT to fd 6 and STDERR to fd 7.
|
||||
exec 6>&1 7>&2
|
||||
# Make xtrace debugging (when used) use redirected STDERR, with verbose lead:
|
||||
|
|
Loading…
Reference in a new issue