| Subject: | cannot pipe output of trap |
|---|---|
| From: | proway.imbusch@xxxxxxxxxxx |
| Date: | Wed, 23 Jul 2008 10:54:29 +0200 |
| Newsgroups: | gnu.bash.bug |
From: oimbusc
To: bug-bash@xxxxxxx
Subject: cannot pipe output of trap
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc'
-DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H
-DRECYCLES_PIDS -I. -I/home/eblake/bash-3.2.39-19/src/bash-3.2
-I/home/eblake/bash-3.2.39-19/src/bash-3.2/include
-I/home/eblake/bash-3.2.39-19/src/bash-3.2/lib -O2 -pipe
uname output: CYGWIN_NT-5.1 CSTRD00000A07HE 1.5.25(0.156/4/2) 2008-06-12
19:34 i686 Cygwin
Machine Type: i686-pc-cygwin
Bash Version: 3.2
Patch Level: 39
Release Status: release
Description:
After registering trap handlers, 'trap | cat' does not deliver any
output ('trap' does).
Repeat-By:
#!/usr/bin/bash
allSignalNames () {
trap -l | tr '\t' '\n' | awk '{ print $2; }' | sed 's/^SIG//g'
| echo `cat`
}
log () {
echo >&2 "$@"
}
log "BASH_VERSION: $BASH_VERSION"
for signal in EXIT `allSignalNames`; do
trap "echo \"trapped: $signal\"" $signal
done
log "<<< trap"
trap
log ">>> trap"
log "<<< trap | cat"
trap | cat
log ">>> trap | cat"
trapOut="/tmp/trap"
log "<<< trap > $trapOut; cat $trapOut"
trap > "$trapOut"
cat "$trapOut"
log ">>> trap > $trapOut; cat $trapOut"
If you are not the intended addressee, please inform us immediately that you
have received this e-mail in error, and delete it. We thank you for your
cooperation.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: bash: request for a way to return variables to the parent of a subshell, Richard Neill |
|---|---|
| Next by Date: | Re: inconsistent treatment of backslash-bang, Lawrence D'Oliveiro |
| Previous by Thread: | Re: bash: request for a way to return variables to the parent of a subshell, Paul Jarc |
| Next by Thread: | Re: cannot pipe output of trap, Chet Ramey |
| Indexes: | [Date] [Thread] [Top] [All Lists] |