This is the mail archive of the
mailing list for the GCC project.
Re: Rev 146953 seems not to work proper for mingw targets
2009/5/14 Julian Brown <firstname.lastname@example.org>:
> Hi Kai,
> On Wed, 13 May 2009 20:05:42 +0200
> Kai Tietz <email@example.com> wrote:
>> the patch at http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01599.html
>> breaks things for mingw target. I am a bit curious that you duplicate
>> handles here (which is ok so far), but also close origin without
>> checking for standard handles. The checks existing like
>> ? if (in != STDIN_FILENO)
>> ? ? _close (in);
>> ? if (out != STDOUT_FILENO)
>> will close it always, because the _dup'ed handle will never have value
>> STDIN_FILENO for sure. What is the intension of this patch? It looks a
>> bit wired and wrong so far.
> It cleared up an issue we were having where the child program blocked
> forever after the parent died. It seems to be a fairly common problem
> with pipes on win32, IIUC. I seem to have mangled the fix a bit
> Can you try the attached patch (sorry, against an earlier version of
> the patch in our tree, but the required changes are obvious) to see if
> it works to fix your problem? It still seems to fix our original issue,
> ? ?libiberty/
> ? ?* pex-win32.c (pex_win32_exec_child): Fix logic to avoid closing
> ? ?standard handles (stdin, stdout, stderr) in parent.
Yes, it works again.
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination