From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 28 10:40:09 2021 Received: (at submit) by debbugs.gnu.org; 28 Dec 2021 15:40:09 +0000 Received: from localhost ([127.0.0.1]:47231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2Ea9-00011S-0e for submit@debbugs.gnu.org; Tue, 28 Dec 2021 10:40:09 -0500 Received: from lists.gnu.org ([209.51.188.17]:60140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2Ea7-00011K-P3 for submit@debbugs.gnu.org; Tue, 28 Dec 2021 10:40:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Ea7-0004IE-Df for bug-guile@gnu.org; Tue, 28 Dec 2021 10:40:07 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2Ea5-0003r7-JC for bug-guile@gnu.org; Tue, 28 Dec 2021 10:40:07 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8266A5C00CD; Tue, 28 Dec 2021 10:40:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 28 Dec 2021 10:40:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=lIF3z0naPvDBZ9w4r7sWK8ciDzQrONkqpl6lfHuZi vE=; b=F1NR5BDe7s8V2lHXFc90lxCqZqTv3mUZRxYFhnpNEVi3/DqURqCA702IN 7ljHfMhtBldX/3y49xnIHIC8jLeLsYHfQNcbWvShKazbwoDtJ2YSsa1xpQHHIY33 dFUO0fL8inFZi9eFDt5lpbl+5Cb8FJ5uZHTRYE2gSJNaZRtVy5WEdXM+tMGU0hPR 7uX6hlpz8OaZIbVQDmywSfdpNn/UtghuaTX9Rxm4qU1Dv4rXIW1OCRJTbRm0QVFW 9MXAyEl1c4e3LlnO1K70u31gxVq9uulgmcqygszrn6iFmIXQ1/7imRnM6FatCoVN WmQezyecWuxgULCC+5/awKKPGXgfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudduledgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepvfhimhho thhhhicuufgrmhhplhgvuceoshgrmhhplhgvthesnhhghihrohdrtghomheqnecuggftrf grthhtvghrnhepffdtveefgefhhfevhffhhfegfefffeegtdekfeekgeejveffvdehhedv gfettdfgnecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhplhgvthesnhhghihr ohdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Dec 2021 10:40:03 -0500 (EST) From: Timothy Sample To: Josselin Poiret via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" Subject: Re: bug#52835: [PATCH 0/2] Fix spawning a child not setting standard fds properly References: Date: Tue, 28 Dec 2021 10:40:02 -0500 In-Reply-To: (Josselin Poiret via's message of "Mon, 27 Dec 2021 22:25:56 +0100") Message-ID: <8735mcu4a5.fsf@ngyro.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=66.111.4.27; envelope-from=samplet@ngyro.com; helo=out3-smtp.messagingengine.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit Cc: 52835@debbugs.gnu.org, Josselin Poiret X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) Hey Josselin, Thanks for finding this bug! I have one concern about your patches: Josselin Poiret writes: > The second patch removes renumber_file_descriptor, as it is no longer > used. One thing that =E2=80=98renumber_file_descriptor=E2=80=99 does that we seem= to be losing here is error checking. To my eye, the old code will try and warn the user if they run out of file descriptors, but the new code will not. The other thing that I like is how =E2=80=98renumber_file_descriptor=E2=80= =99 checks the return value of =E2=80=98dup=E2=80=99 in addition to checking =E2=80=98errn= o=E2=80=99. (I realize that the old code skips that check for =E2=80=98dup2=E2=80=99 =E2=80=93 I=E2=80= =99m kinda just stating a preference here.) A quick check of POSIX turns up the following: =E2=80=9C= the value of =E2=80=98errno=E2=80=99 should only be examined when it is indicat= ed to be valid by a function=E2=80=99s return value=E2=80=9D [1]. -- Tim [1] https://pubs.opengroup.org/onlinepubs/9699919799/