public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Rich Eizenhoefer <riche@microsoft.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: From Microsoft: Windows 10 Console and Cygwin
Date: Mon, 04 May 2015 22:35:00 -0000	[thread overview]
Message-ID: <BN3PR03MB1430C0816A9D41BB051687A4B4D20@BN3PR03MB1430.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20150502133833.GB12723@calimero.vinschen.de>

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

  reply	other threads:[~2015-05-04 19:51 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
2015-05-01 19:29       ` Rich Eizenhoefer
2015-05-02 13:47         ` Corinna Vinschen
2015-05-04 22:35           ` Rich Eizenhoefer [this message]
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=BN3PR03MB1430C0816A9D41BB051687A4B4D20@BN3PR03MB1430.namprd03.prod.outlook.com \
    --to=riche@microsoft.com \
    --cc=cygwin@cygwin.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).