delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/04/15:52:09

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=uQTuqypyaj732cBtr0FqRN2BQGrwS
Dd80xW6vPCoQSHCZMeYsUir7jgwA/REmyg65B/8m7dRCRZe9wY8GcK91wsNhrse+
A+ilEWa5XO+oGE2ihVewdvMPf4cjNxW7K0kA8qB9Pk3RKe3J6h6or3ktz3QbKOLL
tQwYrtaiyYkUoo=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=Xi58pjMZ9pNtVYV7IFHpDJl0rtc=; b=kmM
Uyhh01Ycn6QKe0EXCnrT4uYJUP8bAeoxpW/fVyNrFg29nKoX3B3SjnYK+VL4P3Z4
tpSdibo8ZgUfENPzcpMm8QWZNVkzVKhw4gtlc9eBScyDidaNgl4WTB4IW9DsKY/D
3GA4aDIC/bIWpnFFEGoXUql7qGbeY3sdBbchSNrE=
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=0.8 required=5.0 tests=BAYES_50,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: na01-bn1-obe.outbound.protection.outlook.com
From: Rich Eizenhoefer <riche AT microsoft DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: From Microsoft: Windows 10 Console and Cygwin
Date: Mon, 4 May 2015 19:51:43 +0000
Message-ID: <BN3PR03MB1430C0816A9D41BB051687A4B4D20@BN3PR03MB1430.namprd03.prod.outlook.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> <20150430082231 DOT GB19795 AT calimero DOT vinschen DOT de> <BN3PR03MB1430B88AED4339821C7D95BEB4D50 AT BN3PR03MB1430 DOT namprd03 DOT prod DOT outlook DOT com> <20150502133833 DOT GB12723 AT calimero DOT vinschen DOT de>
In-Reply-To: <20150502133833.GB12723@calimero.vinschen.de>
authentication-results: cygwin.com; dkim=none (message not signed) header.d=none;
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1429;
x-microsoft-antispam-prvs: <BN3PR03MB1429F84AC480626D3B60D545B4D20 AT BN3PR03MB1429 DOT namprd03 DOT prod DOT outlook DOT com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(3002001);SRVR:BN3PR03MB1429;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1429;
x-forefront-prvs: 05669A7924
x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(55674003)(51704005)(107886002)(5001960100002)(54356999)(99286002)(92566002)(77156002)(76576001)(2900100001)(62966003)(2501003)(5890100001)(102836002)(50986999)(2950100001)(86612001)(33656002)(2351001)(2656002)(106116001)(450100001)(46102003)(74316001)(86362001)(93886004)(110136002)(87936001)(76176999)(122556002)(40100003)(19580395003)(3826002)(460985005);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR03MB1429;H:BN3PR03MB1430.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en;
MIME-Version: 1.0
X-OriginatorOrg: microsoft.onmicrosoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2015 19:51:43.7171 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1429
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id t44Jq36U009466

Hi Corinna,

On May  1 18:51, Rich Eizenhoefer wrote:
> Hi Corinna,
> 
> I spent most of the day yesterday and part of this AM talking with 
> console devs and going through the windows codebase to  understand the 
> changes between Vista and W7 (and now). The regression in 
> functionality wasn't inadvertent, but related to security.

Oh, ok.  W7 introduced the conhost.exe process as well.  Was that part of the security consideration or was the windowstation change a result of changing to a process-based model?

The tribal knowledge of what drove the change is seeming lost in time. There are no comments in the code base discussing it, nor can we find any legacy specs. There is a reference to the security change being made, but not to the why.

<snip>

Two points:

- I'm on vacation for a while now so my replies will be a bit sluggish
  and testing anything will have to wait, too.  I hope that's ok.

- Tonight it occured to me to ask you another question:

  For a long time Cygwin is emulating pseudo ttys using named pipes.
  This works fine for Cygwin applications, but it has some downside
  when using non-Cygwin executables.  MSVCRT's isatty() function
  returns 0 for named pipes, because it's (obviously) not aware of
  Cygwin's pseudo tty functionality.  As a result, many non-Cygwin
  console applications misbehave in Cygwin terminals or remote ssh
  sessions as soon as it comes to user input or paging.

  Two possible solutions for this problem come to mind:

  - Either MSVCRT's isatty function recognizes named pipes used as
    Cygwin PTYs.  That's not tricky because the name of the pipe is a
    simple indicator.  But I could understand a certain reluctance,
    because that would require the MSVCRT guys to support this solution.

  - Or the console API could be extended (or even just documented as far
    as it exists) so that the Cygwin PTY implementation could use
    console handles under the hood, rather than named pipes.  For that
    to work, the PTY master side would have to have been able to create
    console handles and connect to the master side of them, basically
    the side which right now conhost.exe is attached to.

    Do you see a chance to open this API up to allow other processes
    than conhost to create the master side of a console, aka a PTY
    in POSIX speak?  Or is there already an existing solution I just
    don't see?

I've created a backlog item for this request so we can track the ask. It's possible, but would probably need to pick your brain in-depth more about the ask in the future. In the meantime, is it okay if I attach a copy of this email thread to the internal tracking item in our database? If not, I'll just keep the summary that I've already added.

--Rich

- Raw text -


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