Re: [bash 3.2.39] File descriptor 10 is always duplicated from 0 and cannot be closed

2008-11-02 Thread Clark J. Wang
On Mon, Nov 3, 2008 at 06:19, Chet Ramey <[EMAIL PROTECTED]> wrote: > Clark J. Wang wrote: > > > When I was doing some testing I found the file descriptor 10 is always > > duplicate of fd 0 and it cannot be closed. > > Half right. When a redirection involving fd 0 is evaluated, the shell > has to

Re: [bash 3.2.39] File descriptor 10 is always duplicated from 0 and cannot be closed

2008-11-02 Thread Chet Ramey
Clark J. Wang wrote: > When I was doing some testing I found the file descriptor 10 is always > duplicate of fd 0 and it cannot be closed. Half right. When a redirection involving fd 0 is evaluated, the shell has to save fd 0 somewhere so it can be restored. It uses fcntl to duplicate fd 0 to s

Re: lost output from asynchronous lists

2008-11-02 Thread Stephane Chazelas
On Sat, Nov 01, 2008 at 11:21:01PM -, Sven Mascheck wrote: [...] > : > stdout > stderr [...] > > It fails on old Ultrix sh, which can't redirect the same fd more than once > > in a single statement. But that platform is relatively dead these days. > > More detailed: > > - It actually w

Re: lost output from asynchronous lists

2008-11-02 Thread Ralf Wildenhues
* Stephane Chazelas wrote on Sun, Nov 02, 2008 at 09:53:15AM CET: > On Sat, Nov 01, 2008 at 11:21:01PM -, Sven Mascheck wrote: > [...] > > : > stdout > stderr > [...] > > > It fails on old Ultrix sh, which can't redirect the same fd more than once > > > in a single statement. But that pl