public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com, Rich Eizenhoefer <riche@microsoft.com>
Subject: Re: From Microsoft: Windows 10 Console and Cygwin
Date: Thu, 30 Apr 2015 08:22:00 -0000	[thread overview]
Message-ID: <20150430082231.GB19795@calimero.vinschen.de> (raw)
In-Reply-To: <BN3PR03MB14300D5567A2F7D86BB69A28B4D70@BN3PR03MB1430.namprd03.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]

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
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/fhandler_console.cc;h=44ee1c404baf1263867596c274103f4a216160bb;hb=refs/heads/cygwin-2.0#l2595

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

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

  CreateWindowStation
  SetProcessWindowStation(new window station)
  AllocConsole
  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.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-04-30  8:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 19:01 Rich Eizenhoefer
2015-04-29 19:50 ` Tim Prince
2015-04-29 20:06 ` Corinna Vinschen
2015-04-29 21:31   ` Rich Eizenhoefer
2015-04-30  8:22     ` Corinna Vinschen [this message]
2015-05-01 19:29       ` Rich Eizenhoefer
2015-05-02 13:47         ` Corinna Vinschen
2015-05-04 22:35           ` Rich Eizenhoefer
2015-05-05  8:22             ` Michael DePaulo
2015-05-31 20:07             ` Ismail Donmez
2015-06-01  8:24               ` Corinna Vinschen
2015-06-01 20:27                 ` Rich Eizenhoefer
2015-06-02  7:56                   ` Corinna Vinschen
2015-06-02  8:10                   ` İsmail Dönmez
2015-06-02 16:37                     ` Rich Eizenhoefer
2015-06-02 16:50                       ` Corinna Vinschen
2015-06-02 17:50                         ` Rich Eizenhoefer
2015-06-02 19:20                       ` Eric Blake
2015-06-02 20:36                         ` Vince Rice
2015-06-02 20:49                         ` Warren Young
2015-06-08 11:49                           ` Corinna Vinschen
2015-06-08 17:23                             ` Rich Eizenhoefer
2015-04-29 23:43   ` Michael DePaulo
2015-04-30  7:56     ` Corinna Vinschen
2015-04-30 11:27     ` LRN
2015-04-30 12:44       ` Tony Kelman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150430082231.GB19795@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    --cc=riche@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).