git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9010: Open backflow FIFO once to work around kernel race condition

From
Stefano Lattarini <stefano.lattarini@gmail.com>
Date
Jun 26, 2012, 23:08 UTC
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:
Show 11 quoted lines
> 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
Previous: Junio C Hamano
Message 5 of 5 in “t9010: Open backflow FIFO once to work around kernel race condition”
  1. t9010: Open backflow FIFO once to work around kernel race conditionAnders Kaseorg, Jun 26, 2012
  2. Jonathan NiederJun 26, 2012
  3. Anders KaseorgJun 26, 2012
  4. Junio C HamanoJun 26, 2012
  5. Stefano LattariniJun 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.