summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDevin Torres <devin@devintorr.es>2014-01-23 12:34:20 -0800
committerDevin Torres <devin@devintorr.es>2014-01-23 12:34:20 -0800
commit83556da91816fa4864f50a2dbaa8714e85862a20 (patch)
treed5ae3ce3ac85fcaec8eda82b87bd52f296c01127 /test
parent4b4e70d4e99842936891be5e447426058c245841 (diff)
parent97a04e604f68778e64f990a4989152efd5099305 (diff)
downloadrust-hoedown-83556da91816fa4864f50a2dbaa8714e85862a20.tar.gz
Merge pull request #45 from craigbarnes/pipetrap
Make test runner clean up named pipes, even on early/forced termination
Diffstat (limited to 'test')
-rwxr-xr-xtest/runner.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/runner.sh b/test/runner.sh
index 4787d3f..827fa8f 100755
--- a/test/runner.sh
+++ b/test/runner.sh
@@ -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"