bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52835: [PATCH v4 3/4] Remove useless closing code in start_child.


From: Josselin Poiret
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]