Subject: Re: More WordPerfect 6.0 problems / FIFOs
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Bakul Shah <bakul@netcom.com>
List: current-users
Date: 04/07/1995 14:06:44
> Oh oh oh oh.  That's triggering an ancient memory.  Does anyone have a recent
> SVID handy?  I *think* they require that very behavior (O_RDWR opens a named
> pipe without blocking because, well, it's got a reader and a writer).  I seem

My copy of SVID (printed in 1986) as well as POSIX use
almost identical wording here.  POSIX says (on page 89)

O_NONBLOCK
	(1) When opening a FIFO with O_RDONLY or O_WRONLY set:
	...
	    (b) If O_NONBLOCK is clear:
		An open() for reading-only shall block until a process
		opens the file for writing.  An open() for writing-only
		shall block until a process opens the file for reading.

SVID (page 110) wording can be derived by doing
:%s/NONBLOCK/NDELAY/g
:%s/shall/will/g

I claim the behavior you describe is undefined because
nothing is said about an open() for reading-and-writing but
I suppose the non blocking behavior can be justified in a
twisted sort of way.

--bakul