From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#59321: ice-9's open-input-pipe is unexpectedly slow on some systems Date: Fri, 13 Jan 2023 16:37:24 +0100 Message-ID: <87fscebg3v.fsf@gnu.org> References: <8d55cf7d1e5382c874cfcaee1f4cddd3@posteo.de> <87r0xx5yja.fsf@gnu.org> <871qppaigl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3188"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: hylophile@posteo.de, 59321-done@debbugs.gnu.org To: Andrew Whatson Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Jan 13 16:49:54 2023 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGMJW-0000Rz-6o for guile-bugs@m.gmane-mx.org; Fri, 13 Jan 2023 16:49:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGM88-0004yP-GC; Fri, 13 Jan 2023 10:38:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGM83-0004wS-Mp for bug-guile@gnu.org; Fri, 13 Jan 2023 10:38:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGM83-00047k-Ej for bug-guile@gnu.org; Fri, 13 Jan 2023 10:38:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGM82-0005js-RO for bug-guile@gnu.org; Fri, 13 Jan 2023 10:38:02 -0500 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Fri, 13 Jan 2023 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 59321 X-GNU-PR-Package: guile Mail-Followup-To: 59321@debbugs.gnu.org, ludo@gnu.org, hylophile@posteo.de Original-Received: via spool by 59321-done@debbugs.gnu.org id=D59321.167362425522010 (code D ref 59321); Fri, 13 Jan 2023 15:38:02 +0000 Original-Received: (at 59321-done) by debbugs.gnu.org; 13 Jan 2023 15:37:35 +0000 Original-Received: from localhost ([127.0.0.1]:52161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGM7a-0005iv-NR for submit@debbugs.gnu.org; Fri, 13 Jan 2023 10:37:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGM7Z-0005ii-AG for 59321-done@debbugs.gnu.org; Fri, 13 Jan 2023 10:37:33 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGM7T-00040b-Ss; Fri, 13 Jan 2023 10:37:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=WsR4aSD8kctQRNvR1AywZenlKqADo8VJNOtFqqSxIfI=; b=YKhaAjcscudI/pZue86w hZjfSVs57jb3YQXHds1HVOTkuMxspL/FKqHZLebFIgPjSmXE5dvjFOFoHfuxIeWJKLLGaeQEEGLG+ 1PESExZQlDmjLSJSZt2AMXX9B84yIE407fBhECN0UXGUET96G7u2Aa30FxX6asf1uNddPSVQSc4Jh J8y5azQy9n4YCeAAFiqVnQtijDT8A7rfw2dFZOu0Gx7PemB4c9+CwdYIklIxC62bziTrFpeM576X4 qM6pSNr9sQxB/HLichkv4sKRl+0gVTAjSwM9QgKjOtc+ZyUsYY7CZCsyHt/RN75bDwUtLM/0yFn/y NafLGDlUrP6Flg==; Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGM7T-00030J-Fw; Fri, 13 Jan 2023 10:37:27 -0500 In-Reply-To: (Andrew Whatson's message of "Thu, 8 Dec 2022 22:02:04 +1000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10511 Archived-At: Hello! Andrew Whatson skribis: > commit c012d7b0d5248a99a3a92780687a676c5d420f5f > Author: Andrew Whatson > Date: Thu Dec 8 21:43:28 2022 +1000 > > Reduce redundant close() calls when forking on some systems. >=20=20=20=20=20 > Some systems provide "/proc/self/fd" which is a directory containing = an > entry for each open file descriptor in the current process. We use t= his > to limit the number of close() calls needed to ensure file descriptors > aren't leaked to the child process when forking. >=20=20=20=20=20 > * 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-fo= rce > approach in 'close_inherited_fds_slow'. Finally applied on top of the =E2=80=98posix_spawn=E2=80=99 series as commit 9332b632407894c2e1951cce1bc678f19e1fa8e4. Thanks! Ludo=E2=80=99.