Package: bash
Version: 2.05a-11
Severity: grave

chiark:~> bash 0>/dev/null
chiark:~> echo $?
0
chiark:~> strace bash 0>/dev/null 2>&1 | egrep '^read\(0|^_?exit'
read(0, 0x80cadb0, 1)                   = -1 EBADF (Bad file descriptor)
_exit(0)                                = ?
chiark:~> dpkg -s bash
Package: bash
Essential: yes
Status: install ok installed
Priority: required
Section: base
Installed-Size: 872
Maintainer: Matthias Klose <[EMAIL PROTECTED]>
Version: 2.05a-11
Replaces: bash-doc (<= 2.05-1), bash-completion
Depends: base-files (>= 2.1.12)
Pre-Depends: libc6 (>= 2.2.4-4), libncurses5 (>= 5.2.20020112a-1)
Conflicts: bash-completion
Conffiles:
 /etc/bash.bashrc e218a2979b01db4e9c3ae19c94294a57
 /etc/bash_completion 5769c2f29cbbc0bde1cf2996ec6231ec
 /etc/skel/.bash_profile d8e9ecd0b80102c82966a045544bbf68
 /etc/skel/.bashrc e9d2739d6f3d7672222c07d901d46e21
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).

chiark:~> type bash
bash is hashed (/bin/bash)
chiark:~>

I have also reproduced this with bash 2.05b-2-26, and in the latter
case managed to prove to myself that it does the same with EIO.

This lack of proper error handling might easily cause data loss, as a
script might exit 0 when it hasn't done its work.

Ian.


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

Reply via email to