This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: subshell redirection (/dev/fd/x)


On Tue, 17 Feb 2009, Brian Ford <Brian.Ford@FlightSafety.com> wrote:
$ uname -a
CYGWIN_NT-5.1 PC1163-8460A-XP 1.7.0(0.193/5/3) 2009-02-09 22:27 i686
Cygwin

Just curious if the following is known behavior?

$ echo a | tee >(wc)
a
tee: /dev/fd/63: Bad file descriptor

$ 0 0 0

The bash term is "Process Substitution".


I had the dim impression that there was a Windows misfeature that
prevented >(...) from working.

Anyway, thanks for reminding me about what I got onto the list to
complain about.  I think that, out of the box, <(...) doesn't work
under Cygwin.  We had to do
    ln -s /proc/self/fd /dev/fd
(We got there after we deleted all of Cygwin's directories and
reinstalled.  Apparently we'd set up that symlink before: <(...)
worked before the reinstall, but didn't work afterwards until we did
the symlink above.)

The bash manual says, by the way,

     Process substitution is supported on systems that support named
     pipes (FIFOs) or the /dev/fd method of naming open files.

--
Tim McDaniel, tmcd@panix.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]