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

Re: Zsh 4.3.12: subshell in midnight commander: precmd: 15: bad file descriptor



On Mon, 18 Jul 2011 08:52:34 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> I wonder if the underlying problem doesn't somehow stem from this:
> 
>       * 27721: Src/compat.c [with unnecessary test removed], Src/exec.c,
>       Src/system.h, Src/utils.c:  update zopenmax() not to examine huge
>       numbers of file descriptors; only call it at initialisation;
>       rationalise use of fdtable_size and expansion of fdtable.

I skipped over this yesterday, but are you suggesting we call zopenmax()
with a larger limit when the user tries to manipulate an fd we don't
know about?  (Simply pushing the limit in zopenmax() up unconditionally
doesn't look like a robust fix.)

I'm not sure if we gain much with that:  we still have to trap the
points where we are passed a large enough fd, and until the shell wishes
to do something with the intervening values it has no particular need to
know about them.  But there could easily be a subtlety I've missed.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog



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