Package: bash
Version: 3.1dfsg-8

See transcript below.  The results from using echo and /bin/echo
should be the same.  In particular, when set -e is not in effect, use
of plain echo should not cause the shell to exit even if the attempt
to write produces EPIPE/SIGPIPE.

(NB that this transcript shows two bugs of which this is only one.)

-anarres:~/junk> ll p
prw-rw---- 1 ian ian 0 Feb  2 16:14 p|
-anarres:~/junk> true <p &
[1] 2240
-anarres:~/junk> exec 3>p 
-anarres:~/junk> 
[1]+  Done                    true <p
-anarres:~/junk> sh -c 'exec >&3; exit 42'; echo $?
42
-anarres:~/junk> sh -c 'exec >&3; echo hi; exit 42'; echo $?
141
-anarres:~/junk> sh -c 'exec >&3; /bin/echo hi; exit 42'; echo $?
42
-anarres:~/junk> perl -e 'open F,">&3" or die $!; print F "foo";'; echo $?
141
-anarres:~/junk> strace -ot perl -e 'open F,">&3" or die $!; print F "foo";'
-anarres:~/junk> grep PIPE t
_llseek(0, 0, 0xbfe12370, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
_llseek(1, 0, 0xbfe12370, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
_llseek(2, 0, 0xbfe12370, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
_llseek(4, 0, 0xbfe12400, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(4, "foo", 3)                      = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++
-anarres:~/junk> echo $BASH_VERSION
3.1.17(1)-release
-anarres:~/junk> dpkg -s bash
Package: bash
Essential: yes
Status: install ok installed
Priority: required
Section: shells
Installed-Size: 1848
Maintainer: Matthias Klose <[EMAIL PROTECTED]>
Architecture: i386
Version: 3.1dfsg-8
Replaces: bash-doc (<= 2.05-1), bash-completion
Depends: base-files (>= 2.1.12), debianutils (>= 2.15)
Pre-Depends: libc6 (>= 2.3.6-6), libncurses5 (>= 5.4-5)
Suggests: bash-doc
Conflicts: bash-completion
Conffiles:
 /etc/skel/.bashrc de2b922ef0623ba36dda5fb6f7f7d9ea
 /etc/skel/.bash_profile d1a8c44e7dd1bed2f3e75d1343b6e4e1
 /etc/skel/.bash_logout 22bfb8c1dd94b5f3813a2b25da67463f
 /etc/bash.bashrc 596642d7415ff5d9f013786028a39583
 /etc/bash_completion 9da8d1c95748865d516764fb9af82af9
Description: The GNU Bourne Again SHell
 Bash is an sh-compatible command language interpreter that executes
 commands read from the standard input or from a file.  Bash also
 incorporates useful features from the Korn and C shells (ksh and csh).
 .
 Bash is ultimately intended to be a conformant implementation of the
 IEEE POSIX Shell and Tools specification (IEEE Working Group 1003.2).
 .
 Included in the bash package is the Programmable Completion Code, by
 Ian Macdonald.
-anarres:~/junk>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to