Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: fd used for saving redirected fds leaked to child processes



On Mon, 14 Aug 2017 07:49:52 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Aug 14, 2017 at 2:09 AM, Peter Stephenson
> <p.stephenson@xxxxxxxxxxx> wrote:
> >
> > We need to expose the entire hierarchy for this particular case, but
> > that looks like a stack or a linked list, which seems a little
> > heavyweight for this case.
> 
> Another flag in the fdtable array?

That probably works --- by default we've got to search 64 fd's for the
flag (the usual size for the fdtable if we don't need to enlarge it)
unless we add a (bug-prone) max saved index, but arguably if that seems
a lot it's the 64 itself that's the target for optimisation as it's
already widely used.

pws



Messages sorted by: Reverse Date, Date, Thread, Author