xref: /freebsd/bin/sh/tests/builtins/wait4.0 (revision fed1ca4b719c56c930f2259d80663cd34be812bb)
1# $FreeBSD$
2
3T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX`
4trap 'rm -rf $T' 0
5cd $T || exit 3
6mkfifo fifo1
7trapped=
8trap trapped=1 QUIT
9{ kill -QUIT $$; sleep 1; exit 4; } >fifo1 &
10wait $! <fifo1
11r=$?
12[ "$r" -gt 128 ] && [ -n "$trapped" ]
13