]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/sh/tests/execution/bg13.0
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / bin / sh / tests / execution / bg13.0
1 # $FreeBSD$
2
3 T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX`
4 trap 'rm -rf $T' 0
5 cd $T || exit 3
6 mkfifo fifo1
7 # Use a trap, not the default action, since the shell may catch SIGINT and
8 # therefore its processing may be delayed.
9 { set -C; trap 'exit 5' TERM; read dummy <fifo1; exit 4; } &
10 exec 3>fifo1
11 kill -INT "$!"
12 kill -TERM "$!"
13 exec 3>&-
14 wait "$!"
15 r=$?
16 [ "$r" = 5 ]