Subject: bug#59321: ice-9's open-input-pipe is unexpectedly slow on some systems

From: <[email-masked]>
Date: Fri, 18 Nov 2022 06:52:27 +0100

On Fri, Nov 18, 2022 at 02:49:05PM +1000, Andrew Whatson wrote:
> Hi Nate,
> 
> Thanks for reporting this!  I'm able to reproduce on my systems, and
> have identified the culprit:

[250k calls to close()]

Well spotted.

Here [1] is a good discussion on the problem. Spoiler alert:
there is no nice, simple and portable way around it. There
may be complex, platform-dependent solutions (like, for
example, under Linux go look in /proc/<PID>/fd; BSD has other
tricks).

Of course, that doesn't mean that one should give up trying :)

Cheers

[1] https://stackoverflow.com/questions/56650579/why-should-i-close-all-file-descriptors-after-calling-fork-and-prior-to-callin

-- 
t