Bug 7610 - Unable to feed "trap -p" output into a pipe
: Unable to feed "trap -p" output into a pipe
Status: CLOSED NOTABUG
: Sisyphus
(All bugs in Sisyphus/bash)
: unstable
: all Linux
: P2 normal
Assigned To:
:
: http://lists.gnu.org/archive/html/bug...
:
:
:
  Show dependency tree
 
Reported: 2005-08-09 03:33 by
Modified: 2006-01-10 01:45 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-08-09 03:33:33
bash-2.05b$ trap -p
bash-2.05b$ trap "echo ..." EXIT
bash-2.05b$ trap -p EXIT
trap -- 'echo ...' EXIT
bash-2.05b$ trap -p EXIT |wc -l
0
bash-2.05b$
------- Comment #1 From 2005-12-31 02:21:47 -------
Same happens with bash-3.0
------- Comment #2 From 2006-01-07 01:14:29 -------
Same with bash-3.1.1.
------- Comment #3 From 2006-01-10 01:45:31 -------
From Chet Ramey answer:
"Each element of a pipeline is run in a subshell.
Subshells don't traps from their parent."

http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00019.html