]> git.saurik.com Git - apple/shell_cmds.git/blob - sh/tests/builtins/wait4.0
358513c81a8d2d9edc7a05349e99b8a765b10833
[apple/shell_cmds.git] / sh / tests / builtins / wait4.0
1 # $FreeBSD: head/bin/sh/tests/builtins/wait4.0 247206 2013-02-23 22:50:57Z jilles $
2
3 T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX`
4 trap 'rm -rf $T' 0
5 cd $T || exit 3
6 mkfifo fifo1
7 trapped=
8 trap trapped=1 QUIT
9 { kill -QUIT $$; sleep 1; exit 4; } >fifo1 &
10 wait $! <fifo1
11 r=$?
12 [ "$r" -gt 128 ] && [ -n "$trapped" ]