bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with create_pipe_bidi


From: Bruno Haible
Subject: Re: Help with create_pipe_bidi
Date: Sat, 18 Jul 2009 15:50:20 +0200
User-agent: KMail/1.9.9

Hi Akim,

> We, at Bison Corp., have some bug occurring on Tru64 
> (http://lists.gnu.org/archive/html/bug-bison/2009-06/msg00004.html 
> ) that seems to be related with our piping into GNU M4.  Bison  
> basically reads its input, feeds m4 with various files, and "parses"  
> the output of m4 before producing the expected files.

Such piping, where you write from the current process and read into
the current process, may hang on BSD systems, because some data is
present in system buffers but the system wants the buffers to be full
before it continues. A fix for this hang is to enable non-blocking I/O
and use a loop with select() that alternately reads and writes. See
<http://git.savannah.gnu.org/gitweb/?p=gettext.git;a=blob;f=gettext-tools/src/msgfilter.c;hb=HEAD#l580>

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]