This is a discussion on fifo problem in RHEL4 AS (184.108.40.206) - Unix ; Dear All, I am having problem with fifo read. we have 11 deamon process running and 1 cron job. 1 Deamon (Reader Process) will read from fifo and 10 other Deamon(Writer Process) will write into fifo. The flow in program/application ...
I am having problem with fifo read. we have 11 deamon process
running and 1 cron job. 1 Deamon (Reader Process) will read from fifo
and 10 other Deamon(Writer Process) will write into fifo.
The flow in program/application goes like this :
cron will echo a message in fifo. Reader process will read that
message and based on pid will send a signal(SIGUSR2) to corresponding
process. Corresponding Writer process will do required processing and
write a idle message back to fifo. Reader Process will read idle
message and do the required status update. Some writer process will
send idle command to fifo every 2 min.
But sometimes idle command is missing , reader has no clue where it
has gone. While writer will say that i have written idle command. I
have checked that they are connecting to common fifo only so writer is
writing in right fifo only. The issue is not getting reproducible , it
just occur some time randamly.
Other Info :
Writing is done in unbuffered(write system call) mode and O_NONBLOCK
Reading is done in buffered mode (fgets functional call). Reader will
open fifo in Both reading and writing mode to make sure that no
closing of fifo from reader and we do not get PIPE signal.
Command writtern from cron to fifo is around 20 bytes and idle command
is around 15 bytes, so not violating PIPE_BUF size too which 4096 in
will really appreciate if anyone can give a hint on it what's
This problem is occouring only in Linux (RHEL 4), and there was no
issue when the same program runs on HP-UX.
Please let me know in case of any clarification.
Thanks & Regards,