{lp,cb}Reserved2 under Windows 7 and file descriptors

Daniel Colascione dan.colascione@gmail.com
Mon Sep 13 03:35:00 GMT 2010


On 9/12/10 3:41 PM, Christopher Faylor wrote:
> So this wasn't just an idea which went unimplemented waiting for tuits.
> It went unimplemented because I thought it was a bad idea.

It is a lie, but it's also a distinction without a difference.  What
kind of misbehavior could we expect to be caused by lying to a program
this way? Most programs that care to use console-specific functionality
will test for a console by using GetFileType() or just get the console
by opening "CONIN$". It would be very unusual to make decisions about
win32-level functionality based on a call to the C runtime file
descriptor library.

Furthermore, in the rare instance that a program *does* misbehave, by
simply running "cat | program", we restore the old behavior.

The one case I can see that might be a problem is the
"Console and Port I/O" family of functions, at
http://msdn.microsoft.com/en-us/library/7x2hy4cx.aspx.

If they work, I think the likelihood of the lie breaking an application
is slim. If they are broken, then I'll agree with cgf that the hack is
probably a bad idea, at least as something to enable by default.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100913/f597da35/attachment.sig>


More information about the Cygwin mailing list