delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <20100913041226.GA18909@ednor.casa.cgf.cx> |
References: | <000801cb2383$9c3ad3a0$d4b07ae0$@gmail.com> <20100714184922 DOT GA13548 AT ednor DOT casa DOT cgf DOT cx> <001001cb23a5$3a879090$af96b1b0$@gmail.com> <AANLkTimpz7mghcPDk=tt7xCXkrgruoGf6+bCReM3KziG AT mail DOT gmail DOT com> <20100912224108 DOT GA18097 AT ednor DOT casa DOT cgf DOT cx> <4C8D5A50 DOT 2020900 AT gmail DOT com> <20100913041226 DOT GA18909 AT ednor DOT casa DOT cgf DOT cx> |
Date: | Mon, 13 Sep 2010 07:11:06 +0100 |
Message-ID: | <AANLkTinP+VLMTHWnWaEGY0w5s_fsgL4egzmi-5vqXLZ3@mail.gmail.com> |
Subject: | Re: {lp,cb}Reserved2 under Windows 7 and file descriptors |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On 13 September 2010 05:12, Christopher Faylor wrote: > On Sun, Sep 12, 2010 at 03:55:12PM -0700, Daniel Colascione wrote: >>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. =C2=A0What >>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. > > No. =C2=A0It wouldn't. > >>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. > > Those are what I was thinking of actually. Guarding the use of console-specific functions with isatty() is wrong, because isatty() is true not only for consoles but also for printers and serial ports, apparently. Not that that would stop anyone ... (Btw, the _isatty() documentation actually mentions "terminal" as a character device alongside "console". What could they mean by that?) > I'm not going to keep looping on this argument, making the same points > over and over. =C2=A0I'm not willing to add this particular functionality= to > Cygwin. Fair enough. Would a standalone utility implementing this hack be welcome though? Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |