Robert Elz <k...@munnari.oz.au> wrote, on 31 Jul 2019:
>
>   | I'll admit that EMFILE is rare, but given a combination of the
>   | above factors it certainly can happen.
> 
> Yes, it can - but so infrequently and with consequences no
> different than what happens with far more likely problems which
> the shell cannot treat as "abandon hope and abort" that it really
> is not worth worrying about.
> 
>   | Slow down?  You jest.  The shell is making a system call to open a
>   | directory.  The time taken to check the errno value is negligible in
>   | comparison to that.
> 
> Certainly, the extra time is small by comparison, but the opendir() and
> its costs are required, that's how we make the algorithm work.  The
> check for errno is not required, and is *extra* delay (albeit fairly
> small) that isn't really useful for anything in practice.
> 
> When I get users complaining about their scripts behaving improperly
> because they were affected by stray EMFILE errors that they did not
> inflict upon themselves, then maybe I'll add a test for it.  Until
> then it simply is not going to happen.

That's up to you.  But you should let other shell authors come to
their own decision about the matter, not try to force them to do it
your way by pushing for the standard to require EMFILE to be ignored.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to