]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/builtins/trap4.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / trap4.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/builtins/trap4.0 217035 2011-01-05 23:17:29Z jilles $
71aad674
A
2
3T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
4trap 'rm -rf $T' 0
5cd $T || exit 3
6mkfifo fifo1
7
8v=$(
9 exec 3>&1
10 : <fifo1 &
11 {
12 wait $!
13 trap 'trap "" PIPE; echo trapped >&3 2>/dev/null' PIPE
14 echo x 2>/dev/null
15 } >fifo1
16)
17test "$v" = trapped