X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sat, 23 Jan 2010 14:03:43 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Bash process substitution
Message-ID: <20100123190343.GB9739@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4B59F278.2090902@gmail.com>  <20100123110719.GU2402@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100123110719.GU2402@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Sat, Jan 23, 2010 at 12:07:19PM +0100, Corinna Vinschen wrote:
>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...

I thought this construction used a fifo under the hood.  That could
point to YA problem with my fifo implementation.

cgf

--
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

