X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4C65AA3A.70303@redhat.com> Date: Fri, 13 Aug 2010 14:25:30 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Broken process substitution References: <00c301cb3b22$ae416800$0ac43800$@gmail.com> <4C65A83F DOT 4010608 AT redhat DOT com> In-Reply-To: <4C65A83F.4010608@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigED82E2C41D22BA05A14BC842" 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 --------------enigED82E2C41D22BA05A14BC842 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/13/2010 02:17 PM, Eric Blake wrote: > On 08/13/2010 02:04 PM, Daniel Colascione wrote: >> Try "echo hello > >(cat)" -- that's supposed to output "hello". >=20 > What makes you think it's supposed to echo hello? That's system > specific on what will happen. According to the bash manual, >=20 >> (cat) >=20 > is evaluated first, and will result in a /dev/fd reference, or a named > pipe (it so happens that it is a /dev/fd reference in cygwin). But this > pipe is tied to the subprocess, so it only exists as long as the > subprocess exists. Then again, cat should exist until something causes the input side of its pipe to declare EOF; so I guess there's no race in this example after all. Rather, it looks like a limitation in cygwin1.dll. I don't know why bash is unable to duplicate the output end of the pipe to the echo process, unless cygwin's /dev/fd handling doesn't work on pipes. But that's highly likely that you are dealing with yet another one of cygwin's pipe handling shortfalls. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigED82E2C41D22BA05A14BC842 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJMZao6AAoJEKeha0olJ0NqYKIH/Rv25BY7GQIvalFrfDgaZ9zK rY73H75iO1YEr/rvo/C/b1mr5ebpU0o15XI1oqc30Le1rwGhQz6GE5lUDRAgn7EN NTnaygCIbWKKnHlWvl7Txg1MV840pVIOlxidtNy5khLZ7J84AC9nUyCiplsGkeQY /nSOsZa2siiqIxz5PUVAEesnxr1bZCGU3FyB2M0ISXNaNAK7H/LHd+PfmVYxYdJI 5f7DiKO1EjWvbspFCeyYdF/Pw/IZAgVtyAHf53BpbhsDayy2TP2UvbUrSmU855Qe mWk430mO1bpAyhE9PpcXk62wBoJItMUkfj3xnSjuMfJWCyo2GZMXHxY2yCmHoQU= =2DGG -----END PGP SIGNATURE----- --------------enigED82E2C41D22BA05A14BC842--