Package: bash
Version: 4.3-7
Severity: minor

Dear Maintainer,

it is stated in manpage that duplicating RO file descriptor causes a
redirection error:

 >>>
$ man 1 bash | grep -A17 'Duplicating File Descriptors$' | tail -n2
       output (file descriptor 1) is used.  If the digits in word do not 
specify a  file  descriptor
       open  for  output,  a redirection error occurs.  If word evaluates to -, 
file descriptor n is
 <<<

but it does not:

 >>>
$ ( set -e ; exec 3< /dev/null ; exec 4>&3 ; echo OK )
OK
 <<<

an error would be to write to the RO file descriptor:

 >>>
$ ( set -e ; exec 3< /dev/null ; exec 4>&3 ; echo >&4 ; echo OK )
bash: echo: write error: Bad file descriptor
 <<<

it is not a redirection error, but another one; I have checked two other
shells: dash and ksh, — neither of them raises any redirection error, then I
guess it is a documentation bug, and this sentence can be safely removed:

 >>>
If the digits in word do not specify a file descriptor open for output, a 
redirection error occurs.
 <<<

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14.2-ygrex-mac (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash depends on:
ii  base-files   7.3
ii  dash         0.5.7-4
ii  debianutils  4.4
ii  libc6        2.19-1
ii  libtinfo5    5.9+20140118-1

Versions of packages bash recommends:
pn  bash-completion  <none>

Versions of packages bash suggests:
pn  bash-doc  <none>

-- Configuration Files:
/etc/bash.bashrc changed [not included]

-- 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

Reply via email to