This is the mail archive of the cygwin 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: popup consoles on Windows 7


On Jun 26 13:41, Andy Koppe wrote:
> 2009/6/26 Corinna Vinschen:
> >> Forgot to say: the occurances of this could at least be reduced by
> >> trying AttachConsole to get a hold on the parent process' console, if
> >> any. When I attempted that in MinTTY, though, I couldn't make it work.
> >
> > Yes, I thought of trying AttachConsole first. ?It's a band-aid since
> > it will of course not work if there's just no parent console
> 
> That can be dealt with, because AttachConsole reports back whether it
> did manage to attach, so if it doesn't, one can then call AllocConsole
> and ShowWindowAsync.

Yes, I'm aware how this would work.  What I mean is, it's *still* a
band-aid since in case of a fail to attach, you still have to alloc
a console and you're back to the original problem.  What we could do
using that technique is to minimize the number of console windows.
But it doesn't help to avoid them entirely.  You have still cluttered
your desktop, or rather, your taskbar with console windows.

> But on 64-bit Windows 7 there were some bizarre problems, where it
> just wouldn't attach or it would completely block the parent's
> console. See http://code.google.com/p/mintty/issues/detail?id=83

I assume this...

> >> Did you previously mention that MS fixed bug in this area?
> >
> > Sorry, I don't understand the question. ?I don't think I ever mentioned
> > anything related to a MS bugfix in terms of AttachConsole.
> 
> Ah, seems I jumped to conclusions from this, although it does sound
> like it might address the problems above:
> 
> 2009/5/16 Corinna Vinschen:
> "That's not a workaround for the problem with consoles popping up, but a
> workaround for a W7 x64 specific problem.  There's a bug in the W7 x64
> console code (which appears to be mostly rewritten in W7 anyway) which
> breaks DLL initialization in child processes which have no copy of the
> original console handles from console startup anymore.  This bug has been
> reported upstream and is marked as being resolved, which hopefully
> means it will be fixed in the final W7 release."

...and that problem are related.  It's not the same problem as the
AllocConsole shows up on the wrong WindowStation problem we're talking
about in this thread, though.  The problem with the console handles
in 64 bit Windows is fixed in the latest builds.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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