diff options
author | Devin Torres <devin@devintorr.es> | 2014-01-23 12:34:20 -0800 |
---|---|---|
committer | Devin Torres <devin@devintorr.es> | 2014-01-23 12:34:20 -0800 |
commit | 83556da91816fa4864f50a2dbaa8714e85862a20 (patch) | |
tree | d5ae3ce3ac85fcaec8eda82b87bd52f296c01127 /test | |
parent | 4b4e70d4e99842936891be5e447426058c245841 (diff) | |
parent | 97a04e604f68778e64f990a4989152efd5099305 (diff) | |
download | rust-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-x | test/runner.sh | 1 |
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" |