GNU bug report logs - #52835
[PATCH 0/2] Fix spawning a child not setting standard fds properly

Previous Next

Package: guile;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Mon, 27 Dec 2021 21:27:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>, Timothy Sample <samplet <at> ngyro.com>
Cc: 52835 <at> debbugs.gnu.org
Subject: bug#52835: [PATCH v4 3/4] Remove useless closing code in start_child.
Date: Sat, 28 May 2022 14:46:33 +0200
* libguile/posix.c (start_child): We're closing all fds anyway, no need
to try to close some specific ones beforehand.
---
 libguile/posix.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libguile/posix.c b/libguile/posix.c
index 155ad09b7..94a043cca 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1363,12 +1363,6 @@ start_child (const char *exec_file, char **exec_argv,
        child.  Return directly in either case.  */
     return pid;
 
-  /* The child.  */
-  if (reading)
-    close (c2p[0]);
-  if (writing)
-    close (p2c[1]);
-
   /* Close all file descriptors in ports inherited from the parent
      except for in, out, and err.  Heavy-handed, but robust.  */
   while (max_fd--)
-- 
2.36.0





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

Previous Next


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