This is the mail archive of the cygwin-apps mailing list for the Cygwin 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: New run version with patches for Windows 7


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


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