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: {lp,cb}Reserved2 under Windows 7 and file descriptors


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.

Attachment: signature.asc
Description: OpenPGP digital signature


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