X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=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 Message-ID: <4C8D4877.7030107@gmail.com> Date: Sun, 12 Sep 2010 14:39:03 -0700 From: Daniel Colascione 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 AT cygwin DOT com Subject: Re: {lp,cb}Reserved2 under Windows 7 and file descriptors References: <000801cb2383$9c3ad3a0$d4b07ae0$@gmail.com> <20100714184922 DOT GA13548 AT ednor DOT casa DOT cgf DOT cx> <001001cb23a5$3a879090$af96b1b0$@gmail.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEEE3ADECA088D722CCBD6BB7" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigEEE3ADECA088D722CCBD6BB7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 9/12/10 2:29 PM, Andy Koppe wrote: > This does appear to work! Proof-of-concept code attached, along with a > couple of tests. Running in mintty: Awesome. Thanks for doing this work. I believe the Cygwin developers had concerns about this change inadvertently breaking some applications. Have you noticed any unusual behavior? > Unfortunately it only seems to work for fdev's direct child process > though. For example, when running cmd.exe through fdev and invoking > isatty.exe from there, it's all zeroes from isatty() again. Unfortunately, cmd.exe does not appear to use the C runtime IO library, and it doesn't pass on inherited file descriptors --- except for the standard handles via CreateProcess. It's a shame, too, because cmd understands the syntax for manipulating the first ten file descriptors in much the same way that a unix shell does. I think it would work for other families of process though, and it's still an improvement. --------------enigEEE3ADECA088D722CCBD6BB7 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) iEYEARECAAYFAkyNSHkACgkQ17c2LVA10Vt0EACcDaY+zST9N3gfZfuywiT5sc7L OeUAoIzN8M9hBe+qgKU7WsuFWyTnsJL/ =zPuF -----END PGP SIGNATURE----- --------------enigEEE3ADECA088D722CCBD6BB7--