X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_CG,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4C8D5A50.2020900@gmail.com>
Date: Sun, 12 Sep 2010 15:55:12 -0700
From: Daniel Colascione <dan.colascione@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: {lp,cb}Reserved2 under Windows 7 and file descriptors
References: <000801cb2383$9c3ad3a0$d4b07ae0$@gmail.com> <20100714184922.GA13548@ednor.casa.cgf.cx> <001001cb23a5$3a879090$af96b1b0$@gmail.com> <AANLkTimpz7mghcPDk=tt7xCXkrgruoGf6+bCReM3KziG@mail.gmail.com> <20100912224108.GA18097@ednor.casa.cgf.cx>
In-Reply-To: <20100912224108.GA18097@ednor.casa.cgf.cx>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDED76490BE99CD8D5CB776D6"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enigDED76490BE99CD8D5CB776D6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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.


--------------enigDED76490BE99CD8D5CB776D6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAkyNWlIACgkQ17c2LVA10VsqCwCff0tqECR2s22Wf4NbUsVkdb6l
6/IAoOsBpPOFmCfFbIdZYalnyI2sn5aq
=LHRF
-----END PGP SIGNATURE-----

--------------enigDED76490BE99CD8D5CB776D6--
