Package: bash
Version: 3.1dfsg-8

See the transcripts below.  The behaviour when the fd is 8
is correct and the behaviour when the fd is 10 is wrong.

-anarres:~/junk> >u; strace -ot bash -c 'exec 10>&1; bash -c "date >&10"' 10>u
-anarres:~/junk> cat u
Fri May 11 14:17:47 BST 2007
-anarres:~/junk> egrep '\b10\b' t
execve("/bin/bash", ["bash", "-c", "exec 10>&1; bash -c \"date >&10\""], [/* 41 
vars */]) = 0
fcntl64(10, F_GETFD)                    = 0
fcntl64(10, F_DUPFD, 10)                = 11
fcntl64(10, F_GETFD)                    = 0
dup2(1, 10)                             = 10
dup2(11, 10)                            = 10
-anarres:~/junk> >u; strace -ot bash -c 'exec 8>&1; bash -c "date >&8"' 8>u
Fri May 11 14:18:07 BST 2007
-anarres:~/junk> cat u
-anarres:~/junk> egrep '\b8\b' t | grep -v rt_sig
execve("/bin/bash", ["bash", "-c", "exec 8>&1; bash -c \"date >&8\""], [/* 41 
vars */]) = 0
getgroups32(65536, [0, 4, 6, 7, 8, 9, 24, 25, 26, 29, 33, 35, 37, 40, 42, 50, 
60, 100, 200, 300, 500, 1143, 5063]) = 23
fcntl64(8, F_GETFD)                     = 0
fcntl64(8, F_DUPFD, 10)                 = 10
fcntl64(8, F_GETFD)                     = 0
dup2(1, 8)                              = 8
-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