Make test runner clean up named pipes, even on early/forced termination

This commit is contained in:
Craig Barnes 2014-01-23 20:06:41 +00:00
parent 4b4e70d4e9
commit 97a04e604f

View file

@ -29,6 +29,7 @@ for TEXT in "$TESTDIR"/*.text; do
# name to pass to mkfifo and "mktemp -u" is not portable.
PIPE=$(mktemp .testpipe-XXXXXXXX)
test -f "$PIPE" -a -n "$PIPE" || abort "mktemp failed"
trap 'rm -f "$PIPE"' EXIT INT TERM HUP
rm -f "$PIPE"
mkfifo "$PIPE" || abort "unable to create named pipe"