From: Mark Mitchell Date: Mon, 27 Mar 2006 09:48:38 +0000 (+0000) Subject: * libiberty/pex-win32.c (pex_win32_exec_child): Close stdout/stderr X-Git-Tag: gdb-csl-20060226-branch-merge-to-csl-local-1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afae4f45a6b7bdec81d0f732a081fcd82147816b;p=thirdparty%2Fbinutils-gdb.git * libiberty/pex-win32.c (pex_win32_exec_child): Close stdout/stderr in parent. --- diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index b1295980efe..046f393c6d9 100644 --- a/libiberty/pex-win32.c +++ b/libiberty/pex-win32.c @@ -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; }