Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: PATCH: no more fd mixups
- X-seq: zsh-workers 8191
- From: Zefram <zefram@xxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxxxxxxxxx (Bart Schaefer)
- Subject: Re: PATCH: Re: PATCH: no more fd mixups
- Date: Sun, 10 Oct 1999 18:53:44 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <991010163903.ZM2414@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "Oct 10, 1999 4:39: 2 pm"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
>Here's a tweak to Zefram's patch to really limit the descriptors to those
>in use by the shell. The substantive change is only to throw in the test
>that the descriptor is in the fdtable[] array,
OK. One issue: coprocess file descriptors. Should they (a) be
passed on to child processes, and (b) be dupable by number? I think
they should be completely private (accessible obly via >&p and <&p),
but more importantly the answers for (a) and (b) should be the same.
At the moment, coprocess fds do not get passed on to children, but they
are explicitly marked as public in fdtable[], and hence after your patch
they are dupable by number.
I *think* all that needs to change is to remove the line
fdtable[coprocin] = fdtable[coprocout] = 0;
from exec.c (where the coprocess is being opened), but I don't completely
follow the use of fdtable[], so I'll leave it to someone with more time
on their hands.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author