This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with pex-win32.c
Mark Mitchell wrote:
> What cygcheck output would be helpful? I've never run cygcheck until
> just now, and it seems to have lots of options.
By the way, I don't see any reason to suspect that there's a Cygwin bug.
The situation is:
1. A Cygwin xterm does not have an associated console.
2. You run a (MinGW) console application from with your xterm. Nothing
pops up a console at this point because Cygwin is clever and does the
right stuff invoking CreateProcess just so.
3. The MinGW console application uses spawn to kick off a second MinGW
console application.
At this point, you get a DOS console box because MSVCRT spawn is not as
clever as Cygwin. The OS sees that this is a console application, and
that there is no associated console, so it creates a new console at this
point.
I don't think Cygwin can prevent that because spawn is implemented by
MSVCRT. This is just a situation where the fact that what looks to the
user like a terminal in Cygwin isn't what Windows thinks of as a
terminal, and that mismatch is exposed as we leave Cygwin by invoking
non-Cygwin applications.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713