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: Bash process substitution


On Jan 22 18:46, Dave wrote:
> Is process substitution expected to work in 1.7.1?
> 
> Here's what I tried:
> 
> kilroyd@MINIME ~
> $ uname -a
> CYGWIN_NT-5.1 MINIME 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin
> 
> kilroyd@MINIME ~
> $ echo LOG:bananas | tee file.txt
> LOG:bananas
> 
> kilroyd@MINIME ~
> $ cat file.txt
> LOG:bananas
> 
> kilroyd@MINIME ~
> $ echo LOG:bananas | tee >(grep "^LOG:" > file.txt)
> LOG:bananas
> tee: /dev/fd/63: Bad file descriptor

I'm not quite sure how this command works under the hood, but it's
possible that this can't work in Cygwin due to a restriction in
Windows.  In contrast to Unix, you can't call open(pipe_fd, O_RDONLY)
if pipe_fd is the write side of a pipe and vice versa.  If bash's
process substitution relies on that, it's simply not possible.
Dunno if there is a way to implement this using some hackery, of course...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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


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