wait5.0 revision 247206
1247206Sjilles# $FreeBSD: head/tools/regression/bin/sh/builtins/wait5.0 247206 2013-02-23 22:50:57Z jilles $ 2247206Sjilles 3247206SjillesT=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX` 4247206Sjillestrap 'rm -rf $T' 0 5247206Sjillescd $T || exit 3 6247206Sjillesmkfifo fifo1 7247206Sjillestrapped= 8247206Sjillestrap trapped=1 QUIT 9247206Sjilles{ kill -QUIT $$; sleep 1; exit 4; } >fifo1 & 10247206Sjilleswait <fifo1 11247206Sjillesr=$? 12247206Sjilles[ "$r" -gt 128 ] && [ -n "$trapped" ] 13