The O in FIFO means “out”. Once your data is “out”, it’s gone. 🙂 So naturally if another process comes along and someone else has already issued a read, the data isn’t going to be there twice.
To accomplish what you suggest you should look into Unix domain sockets. Manpage here. You can write a server which can write to client processes, binding to a filesystem path. See also socket()
, bind()
, listen()
, accept()
, connect()
, all of which you’ll want to use with PF_UNIX
, AF_UNIX
, and struct sockaddr_un
.