tech-userlevel archive

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

Re: open()ing a named pipe with no current readers



> Won't O_NONBLOCK cover this?
No. POSIX says:
O_NONBLOCK
	When opening a FIFO with O_RDONLY or O_WRONLY set:
		If O_NONBLOCK is set, an open() for reading-only shall return without delay. An open() for writing-only shall return an error if no process currently has the file open for reading.

> I don't think you can distinguish "buffer is full right now" from "no
> reader" though.
I wouldn't need to distinguish that.

> Depending on what you're doing you might want a stream socket instead
> of a pipe.
I'm not in control of the reading side.


Home | Main Index | Thread Index | Old Index