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