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: From Microsoft: Windows 10 Console and Cygwin

On Apr 29 21:31, Rich Eizenhoefer wrote:
> Thanks Corinna.
> The info I sent on the bug below is all that I have. It's quite likely
> related to the stability of the version of Win 10 it was run against.

Nothing to worry about.  Msys is so old, it's almost not true anymore.

> My larger purpose is to reach out to you all and see what we can do to
> help Cygwin run with our new console, we don't want to break anybody
> if at all possible. Please send me the info on the Windows 7 issue and
> I'll review and get back to you about whether we are able to help. If
> we "can" (figure it out, understand and repro the issue, not several
> weeks worth of work) we'll get to it.

That may be tricky, but the workaround we use is really annoying.
The problem is centered around creating an invisible console.

Please have a look at;a=blob;f=winsup/cygwin/;h=44ee1c404baf1263867596c274103f4a216160bb;hb=refs/heads/cygwin-2.0#l2595

The comment starting at line 2603 explains what we're trying to

The method called for pre-Windows 7 systems, and the only part of the
functionality up to 2009 is fhandler_console::create_invisible_console,
starting at line 2470.  This simple technique, basically just

  SetProcessWindowStation(new window station)
  SetProcessWindowStation(original window station)

doesn't work anymore since Windows 7.  What happens is that AllocConsole
will NOT create the console in the newly created and invisible window
station, but instead it will create the console fully visible on the
original window station.

As I mentioned in my previous mail, I reported this problem in the
Windows 7 beta test phase, but unfortunately it was rejected.  Windows 8
and 8.1, as well as Windows 10 still suffer the same problem.

The workaround for all systems since Windows 7 is implemented in
fhandler_console::create_invisible_console_workaround starting at line
2508.  See the preceeding and inline comments.  What it does is
basically to start a dummy process with the SW_HIDE flag and then to
attach the current process to the console of this dummy process.

As you can imagine, this is awkward and slow.  It would be very nice
if the original method could be made to work again in Windows 10.

Out of curiosity, and if you're willing to share, it would be nice to
know why this regression (from an external developer point of view) was
introduced in Windows 7.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpVGZKm_yetm.pgp
Description: PGP signature

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