[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59321: ice-9's open-input-pipe is unexpectedly slow on some systems
From: |
tomas |
Subject: |
bug#59321: ice-9's open-input-pipe is unexpectedly slow on some systems |
Date: |
Sun, 20 Nov 2022 20:00:34 +0100 |
On Sun, Nov 20, 2022 at 06:24:57PM +0100, Ludovic Courtès wrote:
> Hi,
>
> Andrew Whatson <whatson@gmail.com> skribis:
>
> > Forcibly closing file descriptors like this shouldn't be necessary if
> > the application has properly opened descriptors with the FD_CLOEXEC
> > flag. It would be good to get input from some more experienced Guile
> > hackers on the potential consequences of this change.
>
> Libguile opens all its own file descriptors at O_CLOEXEC (one omission
> was recently fixed in 0aa1a9976fc3c6af4d1087e59d728cb8fe7d369a) so it
> may be possible to remove that FD-closing loop. There’s still the
> possibility that application bug unwillingly leaks FDs, but we could
> consider it’s none of our business.
>
> Thoughts?
Hm. Socket FDs don't "have" O_CLOEXEC. Arguably, they are at least as
"interesting" as file FDs (meaning: source of obscure bugs).
Moreover, misbehaving C libraries can be an additional source of bugs
we have no control of.
The reference I posted upthread makes a compelling case for at least
needing an option for this (admittedly ugly) close orgy (perhaps with
some additional platform-dependent mitigations, but that's an ugliness
in its own, sigh).
Cheers
--
t
signature.asc
Description: PGP signature