delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/30/04:22:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=we2oErSPmIHOyosy3qQxpRd5Rl9tRVYywFy/K/sNNoU49V9dt4WPT
lk9/oVkVMglKp/7xZZv4UyesPSmnH3H4fhnse8DOL5emLRvThAJf+56X/pghDQTx
KRgpS6fxO/WtkzvRTufU82p2wEW4LdX5gGUA8L9T0C/cznNyklGcX4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=BdekBuuB+3/YAbMkbcOPCkdyhag=; b=QJjvnE5IKr6twHbtKOh8Wd2D012B
uiiUghiRHTyVa1B7HvHD6WPa7+PhpU/FSD4JEKUJlfT+ErSRxNbhyqx5iGg7AtnZ
6YqtSRlA4DeWUGUEhWvtW/9R6AhJq3nPe5eFlx7SqD8eIn/PiPPgFsFwBJ75Mg2q
Zs54+4wk1Mlyi2c=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 30 Apr 2015 10:22:31 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com, Rich Eizenhoefer <riche AT microsoft DOT com>
Subject: Re: From Microsoft: Windows 10 Console and Cygwin
Message-ID: <20150430082231.GB19795@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, Rich Eizenhoefer <riche AT microsoft DOT com>
References: <BY1PR03MB1436C656CEF12387D40CD74EB4D70 AT BY1PR03MB1436 DOT namprd03 DOT prod DOT outlook DOT com> <20150429200616 DOT GL3657 AT calimero DOT vinschen DOT de> <BN3PR03MB14300D5567A2F7D86BB69A28B4D70 AT BN3PR03MB1430 DOT namprd03 DOT prod DOT outlook DOT com>
MIME-Version: 1.0
In-Reply-To: <BN3PR03MB14300D5567A2F7D86BB69A28B4D70@BN3PR03MB1430.namprd03.prod.outlook.com>
User-Agent: Mutt/1.5.23 (2014-03-12)

--St7VIuEGZ6dlpu13
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Apr 29 21:31, Rich Eizenhoefer wrote:
> Thanks Corinna.
>=20
> 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=3Dnewlib-cygwin.git;a=3Dblob;f=3Dwi=
nsup/cygwin/fhandler_console.cc;h=3D44ee1c404baf1263867596c274103f4a216160b=
b;hb=3Drefs/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

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

--St7VIuEGZ6dlpu13
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJVQeZHAAoJEPU2Bp2uRE+gVJ4P/Rntq3EDev2VihSSXCZNFeSg
u1MAdhhL0BT8OEd/TXnYovxKGDOaey9JKn5daG+yCbQQKDURQiTWIX6DuCQ19h1t
G0QKM08WZCzmuodmgeMQA4ds7qPdQue56RzVKiBbJMbX4EdsVowFwSivpU7vEmBx
rotJVfFrAXGx8IHY/GRQesWW8yMVMt+jmfUzoOYEApZluPXlBne/1Fk/Vcbg+Pj5
g+FBbyWhIQUkZNhnAnY2yCyKAjqfLi3SUoozqYrlSezCj4W00LaPnRFaTWqH/CZR
THS9NOooqRoyifrzuWPxvFuvO4Pl6BYCX4BfnZEiieFkvFltDuvLNEINNBDTxICZ
lSC2iLO3bZoIRHT+YOgIjuSZe1V30pzGpBgXGh7cApdJluo3A0MpEXzcTMwrgaoL
aVs9sIP+wNgxJJsA6ySok3bTHp0SHDGqBBnMhvF2KXvF8Fk2idNYnYH3PshYSl+1
BjGG+UlavTWKMAtRTlQze+iKguDEzb+j3M/HNojaZ64llALe+SjKVVE+GjOMdKne
l0nDr8gjT/7rZ13e7OHAZOAypIpM/KaWNUrW6UYn4ds2COM56QI4reVXubVIrQJo
8Vu2I7pSePBfJXL4iQALmEh4d70sn7QX5pX0zwYvg+GnrtoM5IqXPkX8tbrENFtJ
pEeEcriBl1W47DRTwtn4
=nrCR
-----END PGP SIGNATURE-----

--St7VIuEGZ6dlpu13--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019