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: ptys - I give up

On Jul 26 10:24, Daniel Colascione wrote:
> On 7/26/2013 10:10 AM, Corinna Vinschen wrote:
> > On Jul 26 09:55, Daniel Colascione wrote:
> >> In Windows 8, the implementation is completely different. There, console handles
> >> are real kernel objects.
> > 
> > Really?  That's entirely new to me.  Do you know if there's some description
> > available?  What are the implications?  Are console handles now handles to
> > something like named pipes as well?  Is there a console FS comparable to
> > \Device\NamedPipe\?
> I don't know the details, and I'm not aware of any new facilities exposed to
> applications. I'd have loved a pseudoconsole API, but we didn't get one.

I see a new device called \Device\ConDrv and \GLOBAL?? now contains

  CON ->     \Device\ConDrv\Console
  CONIN$ ->  \Device\ConDrv\CurrentIn
  CONOUT$ -> \Device\ConDrv\CurrentOut

> You can see the difference in a debugger, though: console pseudohandles *look*
> strange and don't show up in the process handle table. The difference shouldn't

Console handle value % 4 != 0

> really matter, though: applications shouldn't really care what kind of handles
> they get as long as system APIs accept them. The problem with writes larger than
> 8k (I think that was the limit?) to console handles failing seems to have
> disappeared, though.

Uhm... there was a problem?  I don't see a hint on the net, nor on MSDN.
The Cygwin DLL uses a maximum buffer size of 16K for console writes.
If there's some documented problem, maybe we should reduce the size to 8K.

> > But then again, doesn't that mean that your method stops working on W8?
> Not really --- it'll work fine. The difference means that operations on console
> handles that used not to work on Windows 7 might work on Windows 8. The public
> API contract hasn't changed, however, so applications aren't supposed to be
> doing these things anyway, and as long as application developers care about
> testing their applications on Windows 7, they won't.
> If you eventually do start seeing applications that do things with console
> handles that can't be done with console pseudohandles, well, you can hook more
> APIs to preserve the console handle illusion. But that time is a long way away,
> if it ever arrives at all.

I guess you're right.


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

Problem reports:
Unsubscribe info:

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