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". > > What makes you think it's supposed to echo hello? That's system > specific on what will happen. According to the bash manual, > >> (cat) > > 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. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature