Chet Ramey | ac50fba | 2014-02-26 09:36:43 -0500 | [diff] [blame] | 1 | # make sure process substitution runs the exit trap |
2 | [[ -n $(< <(trap "cat /dev/fd/0" EXIT)) ]] <<<works && echo works || echo "fail :(" | ||||
3 | |||||
4 | read foo < <(trap "echo bar" EXIT) | ||||
5 | echo $foo | ||||
6 | |||||
7 | cat <(trap "echo bar" EXIT) | ||||
8 | |||||
9 | trap "echo bar" EXIT #should proc subst inherit this? | ||||
10 | cat <(echo foo ; exit 0;) | ||||
11 | |||||
12 | trap - 0 | ||||
13 | trap | ||||
14 | |||||
15 | cat <(echo foo; trap "echo bar" EXIT) | ||||
16 | |||||
17 | trap "echo bar" EXIT #should proc subst inherit this? | ||||
18 | cat <(echo foo) |