xref: /freebsd/bin/sh/tests/builtins/wait2.0 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1
2failures=
3failure() {
4	echo "Error at line $1" >&2
5	failures=x$failures
6}
7
8for i in 1 2 3 4 5 6 7 8 9 10; do
9	exit $i &
10done
11wait || failure $LINENO
12wait || failure $LINENO
13
14test -z "$failures"
15