GNU C Library master sources branch master updated. glibc-2.28.9000-344-g02cd5c1

fw@sourceware.org fw@sourceware.org
Sat Dec 1 21:58:00 GMT 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  02cd5c1a8d033d7f91fea12a66bb44d1bbf85f76 (commit)
      from  fc493bc9e6fe8ecdd00f79b9a8a3d4675137a602 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02cd5c1a8d033d7f91fea12a66bb44d1bbf85f76

commit 02cd5c1a8d033d7f91fea12a66bb44d1bbf85f76
Author: Florian Weimer <fweimer@redhat.com>
Date:   Sat Dec 1 21:43:36 2018 +0100

    support: Close original descriptors in support_capture_subprocess

diff --git a/ChangeLog b/ChangeLog
index e00d691..98c7ac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-01  Florian Weimer  <fweimer@redhat.com>
+
+	* support/support_capture_subprocess.c
+	(support_capture_subprocess): Check that pipe descriptors have
+	expected values.  Close original pipe descriptors in subprocess.
+
 2018-12-01  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	[BZ #23032]
diff --git a/support/support_capture_subprocess.c b/support/support_capture_subprocess.c
index 6d2029e..93f6ea3 100644
--- a/support/support_capture_subprocess.c
+++ b/support/support_capture_subprocess.c
@@ -59,8 +59,12 @@ support_capture_subprocess (void (*callback) (void *), void *closure)
 
   int stdout_pipe[2];
   xpipe (stdout_pipe);
+  TEST_VERIFY (stdout_pipe[0] > STDERR_FILENO);
+  TEST_VERIFY (stdout_pipe[1] > STDERR_FILENO);
   int stderr_pipe[2];
   xpipe (stderr_pipe);
+  TEST_VERIFY (stderr_pipe[0] > STDERR_FILENO);
+  TEST_VERIFY (stderr_pipe[1] > STDERR_FILENO);
 
   TEST_VERIFY (fflush (stdout) == 0);
   TEST_VERIFY (fflush (stderr) == 0);
@@ -72,6 +76,8 @@ support_capture_subprocess (void (*callback) (void *), void *closure)
       xclose (stderr_pipe[0]);
       xdup2 (stdout_pipe[1], STDOUT_FILENO);
       xdup2 (stderr_pipe[1], STDERR_FILENO);
+      xclose (stdout_pipe[1]);
+      xclose (stderr_pipe[1]);
       callback (closure);
       _exit (0);
     }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                            |    6 ++++++
 support/support_capture_subprocess.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources



More information about the Glibc-cvs mailing list