tech-userlevel archive

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

open()ing a named pipe with no current readers



I guess that's a rater silly/basic question, but ...

Is there a way to open(.. O_WRONLY ..) an existing named pipe that 
currently has no reader such that
-- the open() will neither block nor fail
-- subsequent write()s to that fd will
	-- succeeed if someone started reading in the meantime
	-- block/return EWOULDBLOCK if still no-one is reading
?

Of course there's the work-around of lazily open()ing the fd before each
write() call.


Home | Main Index | Thread Index | Old Index