Subject: bash: problem trapping SIGPIPE
Package: bash
Version: 3.1dfsg-8
Severity: normal
*** Please type your report below this line ***
Please write a script:
#!/bin/bash
{
shopt
for s in $(seq 64); do
if trap 'true' $s; then
echo "$s -- success";
else
echo "$s -- failure"
fi
done
trap -p
} 2>&1 >> /tmp/traplog.$$
Then run that script twice: from command line and then as cgi.
Then issue diff /tmp/traplog.* and see:
110d109
< trap -- 'true' SIGPIPE
I cannot trap SIGPIPE when script runs as cgi, so I get huge amounts of
errors:
standard output: Broken pipe
write error
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-iplus
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages bash depends on:
ii base-files 4 Debian base system
miscellaneous f
ii debianutils 2.17 Miscellaneous utilities
specific t
ii libc6 2.3.6.ds1-13etch8 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for
terminal hand
bash recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org