]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* libiberty/pex-common.c (pex_run): Close the write end of the
authorMark Mitchell <mark@codesourcery.com>
Tue, 21 Mar 2006 07:54:30 +0000 (07:54 +0000)
committerMark Mitchell <mark@codesourcery.com>
Tue, 21 Mar 2006 07:54:30 +0000 (07:54 +0000)
pipe after starting the child.

ChangeLog.csl
libiberty/pex-common.c

index e55efd234531b6663fdb5b2eb92fd14e802f3aa0..95a2ea8a1ee208f890477def3f4b41060765e6a1 100644 (file)
@@ -1,5 +1,8 @@
 2006-03-20  Mark Mitchell  <mark@codesourcery.com>
 
+       * libiberty/pex-common.c (pex_run): Close the write end of the
+       pipe after starting the child.
+
        * gdb/config/arm/armv7m.mt (TDEPFILES): Add prologue-value.o.
 
 2006-03-21  Paul Brook  <paul@codesourcery.com>
index 38e3ac7695648af827f31786979f2233a1495229..fd0c6b22e9bf86d03d5c64a07b615ed84e00ab85 100644 (file)
@@ -108,6 +108,8 @@ pex_run (struct pex_obj *obj, int flags, const char *executable,
   in = -1;
   out = -1;
   errdes = -1;
+  p[READ_PORT] = -1;
+  p[WRITE_PORT] = -1;
   outname = (char *) orig_outname;
   outname_allocated = 0;
 
@@ -276,6 +278,8 @@ pex_run (struct pex_obj *obj, int flags, const char *executable,
 
   pid = obj->funcs->exec_child (obj, flags, executable, argv, in, out, errdes,
                                &errmsg, err);
+  if (p[WRITE_PORT] != -1)
+    obj->funcs->close (obj, p[WRITE_PORT]);
   if (pid < 0)
     goto error_exit;