wait1.0 revision 208476
1272343Sngie# $FreeBSD: head/tools/regression/bin/sh/builtins/wait1.0 208476 2010-05-23 22:10:20Z jilles $ 2272343Sngie 3272343Sngiefailures= 4272343Sngiefailure() { 5272343Sngie echo "Error at line $1" >&2 6272343Sngie failures=x$failures 7} 8 9exit 4 & p4=$! 10exit 8 & p8=$! 11wait $p4 12[ $? = 4 ] || failure $LINENO 13wait $p8 14[ $? = 8 ] || failure $LINENO 15 16exit 3 & p3=$! 17exit 7 & p7=$! 18wait $p7 19[ $? = 7 ] || failure $LINENO 20wait $p3 21[ $? = 3 ] || failure $LINENO 22 23test -z "$failures" 24