[Haskell-cafe] I/O system brokenness with named pipes

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Apr 11 09:16:55 EDT 2008

On Apr 11, 2008, at 9:08 , John Goerzen wrote:
> On Fri April 11 2008 8:02:07 am Brandon S. Allbery KF8NH wrote:
>> On Apr 11, 2008, at 8:12 , John Goerzen wrote:
>>> OK, I have referred to fifo(7) regarding this point.  It seems I
>>> may need a
>>> loop trying over and over to open the FIFO in write mode.  It also
>>> appears
>>> that ReadWriteMode appearing to work is Linux-specific, and this
>>> behavior is
>>> left undefined in POSIX.
>> Undefined in POSIX, normal for Unix (and Linux originally promised
>> only POSIX semantics but was rejiggered some years back to behave
>> like Unix in this regard, because Unix programs rely on these
>> semantics and therefore failed on Linux).
> Hrm, can you define what OSs you mean when you say "Unix"?

SunOS/Solaris, and in general the descendants of 4.xBSD and AT&T  
System III/V.  Unless this is a different issue from the usual FIFO  
only-works-as-expected-if-both-ends-always-open problem.  That is,  
unless the first opener opens read/write, neither a prospective  
writer nor a prospective reader will be capable of opening it at all;  
depending on OS you will get ENXIO or EPIPE or (in some rare  
implementations) EAGAIN.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list