GNU bug report logs - #59321
ice-9's open-input-pipe is unexpectedly slow on some systems

Previous Next

Package: guile;

Reported by: hylophile <at> posteo.de

Date: Wed, 16 Nov 2022 20:57:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 59321-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Andrew Whatson <whatson <at> gmail.com>
Cc: hylophile <at> posteo.de, 59321-done <at> debbugs.gnu.org
Subject: Re: bug#59321: ice-9's open-input-pipe is unexpectedly slow on some
 systems
Date: Fri, 13 Jan 2023 16:37:24 +0100
Hello!

Andrew Whatson <whatson <at> gmail.com> skribis:

> commit c012d7b0d5248a99a3a92780687a676c5d420f5f
> Author: Andrew Whatson <whatson <at> gmail.com>
> Date:   Thu Dec 8 21:43:28 2022 +1000
>
>     Reduce redundant close() calls when forking on some systems.
>     
>     Some systems provide "/proc/self/fd" which is a directory containing an
>     entry for each open file descriptor in the current process.  We use this
>     to limit the number of close() calls needed to ensure file descriptors
>     aren't leaked to the child process when forking.
>     
>     * libguile/posix.c (close_inherited_fds_slow):
>     (close_inherited_fds): New static helper functions.
>     (scm_spawn_process): Attempt to close inherited file descriptors
>     efficiently using 'close_inherited_fds', falling back to the brute-force
>     approach in 'close_inherited_fds_slow'.

Finally applied on top of the ‘posix_spawn’ series as commit
9332b632407894c2e1951cce1bc678f19e1fa8e4.

Thanks!

Ludo’.




This bug report was last modified 2 years and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.