mknod problem

mknod problem

Post by Abdul-Wahid Paterso » Fri, 03 Sep 1999 04:00:00



I have a simple program that calles mknod to create a FIFO. My program
blocks waiting of a reader and then writes some info the FIFO. Once the
reader has closed its end of the pipe my program loops and waits for
another reader.

To make the work I copied something I found in the Perl (Camel) book
from a fortune cookie example. It has a sleep(1) at the end of the loop
with the comment # to avoid dup sigs.

If the program doesn't sleep it the reader can read the output more than
once.

My question.

Is there a way to get rid of the sleep(1), as it is too long for what I
want to do, without getting dup sigs on the reading process??

Help appreciated.

Please take "nospam" out of my email address for personal replies.

See ya,

Abdul-Wahid