]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* libiberty/pex-win32.c (pex_win32_exec_child): Close stdout/stderr
authorMark Mitchell <mark@codesourcery.com>
Mon, 27 Mar 2006 09:48:38 +0000 (09:48 +0000)
committerMark Mitchell <mark@codesourcery.com>
Mon, 27 Mar 2006 09:48:38 +0000 (09:48 +0000)
in parent.

libiberty/pex-win32.c

index b1295980efeeb2f2b9a9fb542a47fadc0c05243c..046f393c6d9f7a9aad19b73e89b3860d6931557f 100644 (file)
@@ -695,6 +695,13 @@ pex_win32_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED, int flags,
       *errmsg = "CreateProcess";
     }
 
+  /* Close the standard output and standard error handles in the
+     parent.  */ 
+  if (out != STDOUT_FILENO)
+    obj->funcs->close (obj, out);
+  if (errdes != STDERR_FILENO)
+    obj->funcs->close (obj, errdes);
+
   return pid;
 }