From b73218100032ead24360d33361fefa914074f30a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 18:21:26 -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... commit d0a0883eaaeec37800ca5cd07647b7b66a00c453 in Unicorn --- t/my-tap-lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/my-tap-lib.sh b/t/my-tap-lib.sh index ada77ac..3270095 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