about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-19 20:38:42 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-19 20:40:42 -0700
commit48b19585b7f18fff930d61acccd4dcf540f3b605 (patch)
treed7c374bef91602ed7165ba3a0a5c6fd2bbbd6967
parent4671e04d3339276dfa4e931041e943bfe662eebe (diff)
downloadrainbows-48b19585b7f18fff930d61acccd4dcf540f3b605.tar.gz
Don't try to clobber FIFOs at startup since sometimes traps may
not fire.  And while we're at it, avoid trying to unlink them
twice.
-rwxr-xr-xt/test-lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 86476e0..34f0de1 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -90,9 +90,7 @@ rtmpfiles () {
         do
                 name=$id
                 _tmp=$t_pfx.$id
-                > $_tmp
                 eval "$id=$_tmp"
-                _TEST_OK_RM_LIST="$_TEST_OK_RM_LIST $_tmp"
 
                 case $name in
                 *fifo)
@@ -100,6 +98,10 @@ rtmpfiles () {
                         mkfifo $_tmp
                         _TEST_RM_LIST="$_TEST_RM_LIST $_tmp"
                         ;;
+                *)
+                        > $_tmp
+                        _TEST_OK_RM_LIST="$_TEST_OK_RM_LIST $_tmp"
+                        ;;
                 esac
         done
 }