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