~ubuntu-branches/ubuntu/trusty/bash/trusty-security

« back to all changes in this revision

Viewing changes to tests/trap5.sub

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-03-03 22:52:05 UTC
  • mfrom: (1.3.5) (2.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20140303225205-87ltrt5kspeq0g1b
Tags: 4.3-1ubuntu1
* Merge with Debian; remaining changes:
  - skel.bashrc:
    - Run lesspipe.
    - Enable ls aliases.
    - Set options in ll alias to -alF.
    - Define an alert alias.
    - Enabled colored grep aliases.
  - etc.bash.bashrc:
    - Add sudo hint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)