diff options
| author | Chet Ramey <chet.ramey@case.edu> | 2013-08-12 19:18:42 -0400 |
|---|---|---|
| committer | Chet Ramey <chet.ramey@case.edu> | 2013-08-12 19:18:42 -0400 |
| commit | 1442f67c408e60769ff344f9e4c05104e2cef7d0 (patch) | |
| tree | 6c093574f9b9342f172a8d8367aa9a5849cd4d85 /tests/trap5.sub | |
| parent | 25eee30b53c60c43b155880820d29c84928847ca (diff) | |
| download | bash-4.3-beta.tar.gz | |
bash-4.3-beta overlaybash-4.3-beta
Diffstat (limited to 'tests/trap5.sub')
| -rw-r--r-- | tests/trap5.sub | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/trap5.sub b/tests/trap5.sub new file mode 100644 index 00000000..7f3380b4 --- /dev/null +++ b/tests/trap5.sub @@ -0,0 +1,18 @@ +# make sure process substitution runs the exit trap +[[ -n $(< <(trap "cat /dev/fd/0" EXIT)) ]] <<<works && echo works || echo "fail :(" + +read foo < <(trap "echo bar" EXIT) +echo $foo + +cat <(trap "echo bar" EXIT) + +trap "echo bar" EXIT #should proc subst inherit this? +cat <(echo foo ; exit 0;) + +trap - 0 +trap + +cat <(echo foo; trap "echo bar" EXIT) + +trap "echo bar" EXIT #should proc subst inherit this? +cat <(echo foo) |
