This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Avoid console windows on Win32


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;
 }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]