From: Stefano Lattarini Date: Tue, 26 Jun 2012 23:08:44 GMT Subject: Re: [PATCH] t9010: Open backflow FIFO once to work around kernel race condition Message-ID: <4FEA40FC.2080604@gmail.com> In-Reply-To: <20120626224053.GA7155@burratino> [Adding bug-autoconf] On 06/27/2012 12:40 AM, Jonathan Nieder wrote: > Hi, > > Quick first impressions: > > Anders Kaseorg wrote: > >> Sidestep this problem by opening the backflow FIFO once for >> read+write. > > Is that portable? > According to the Autoconf manual, no: Some shells, like ash, don't recognize bi-directional redirection (‘<>’). And even on shells that recognize it, it is not portable to use on fifos: Posix does not require read-write support for named pipes, and Cygwin does not support it: $ mkfifo fifo $ exec 5<>fifo $ echo hi >&5 bash: echo: write error: Communication error on send But while the issue about Cygwin might still be relevant, the one about ash seems to be out-of-date: I've verified that the "exec 5<>fifo" command works with both dash 0.5.2 and dash 0.5.5.1 (that's why I'm CC:ing bug-autoconf). Regards, Stefano