1# $FreeBSD: head/tools/regression/bin/sh/builtins/wait3.0 215547 2010-11-19 21:15:06Z jilles $
| 1# $FreeBSD: head/tools/regression/bin/sh/builtins/wait3.0 236771 2012-06-08 22:54:25Z jilles $
|
2 3failures= 4failure() { 5 echo "Error at line $1" >&2 6 failures=x$failures 7} 8 9T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) 10trap 'rm -rf $T' 0 11cd $T || exit 3 12mkfifo fifo1 13for i in 1 2 3 4 5 6 7 8 9 10; do 14 exit $i 4<fifo1 & 15done 16exec 3>fifo1 17wait || failure $LINENO
| 2 3failures= 4failure() { 5 echo "Error at line $1" >&2 6 failures=x$failures 7} 8 9T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) 10trap 'rm -rf $T' 0 11cd $T || exit 3 12mkfifo fifo1 13for i in 1 2 3 4 5 6 7 8 9 10; do 14 exit $i 4<fifo1 & 15done 16exec 3>fifo1 17wait || failure $LINENO
|
18(echo >&3) 2>/dev/null && failure $LINENO
| 18(${SH} -c echo >&3) 2>/dev/null && failure $LINENO
|
19wait || failure $LINENO 20 21test -z "$failures"
| 19wait || failure $LINENO 20 21test -z "$failures"
|