This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Avoid console windows on Win32
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Danny Smith <dannysmith at clear dot net dot nz>
- Cc: GCC-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Mar 2006 13:09:22 -0800
- Subject: Re: PATCH: Avoid console windows on Win32
- References: <000001c64d38$50c3bbb0$396d65da@anykey>
Danny Smith wrote:
> This breaks -pipe switch
Based on Ian's feedback, I needed to change pex-win32.c to close the
descriptors, to fix this bug, instead of pex-common.c. So, here is an
additional patch (to be applied on top of the big patch which you've
already approved) to do that. I've verified that without this patch,
-pipe fails, while, with this patch, it works.
I don't want to check in the big patch without this additional patch, so
as to avoid breaking -pipe, so I'm going to hold off on that commit,
until you review this patch.
Is this patch OK, in conjunction with the previous patch?
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
Index: pex-win32.c
===================================================================
--- pex-win32.c (revision 112230)
+++ pex-win32.c (working copy)
@@ -693,6 +693,13 @@ pex_win32_exec_child (struct pex_obj *ob
*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;
}