New run version with patches for Windows 7

Andy Koppe andy.koppe@gmail.com
Sun Aug 9 13:26:00 GMT 2009


2009/8/9 Corinna Vinschen:
>> > Having the console creation code in run also has the advantage of
>> > working when starting run from an existing console window.  The child
>> > process will run detached from the existing console in an invisible
>> > console window.  You can close the original console afterwards without
>> > killing the process ran through run.
>>
>> That shouldn't be an issue. MSDN on FreeConsole(): "A console is
>> closed when the last process attached to it terminates or calls
>> FreeConsole."
>
> Actually, it turned out that the entire FreeConsole/AttachConsole
> stuff is entirely unnecessary.

You're right, and the MSDN quote was irrelevant, because it doesn't
say what happens to the attached processes when the user closes a
console window. (Presumably they all get killed?)

> What I didn't realize
> is that run.exe as a GUI application has no console attached.  Thus,
> only the child application started from run gets a hidden console
> created by Cygwin.

Yep, that's what mintty and xwin rely on as well.

Andy



More information about the Cygwin-apps mailing list