From d0a0883eaaeec37800ca5cd07647b7b66a00c453 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 16:28:51 -0700 Subject: my-tap-lib: fix race condition in verbose mode Don't try to redirect until we know our FIFO consumers are ready for us. This only seems to happen with bash and not ksh... --- t/my-tap-lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/my-tap-lib.sh b/t/my-tap-lib.sh index 2d0c1a9..eced1e0 100644 --- a/t/my-tap-lib.sh +++ b/t/my-tap-lib.sh @@ -188,9 +188,10 @@ then ( # use a subshell so seds are not waitable - $SED -e 's/^/#: /' $t_stdout & - $SED -e 's/^/#! /' $t_stderr & + $SED -e 's/^/#: /' < $t_stdout & + $SED -e 's/^/#! /' < $t_stderr & ) & + wait exec > $t_stdout 2> $t_stderr else exec > /dev/null 2> /dev/null -- cgit v1.2.3-24-ge0c7