how to make fifos keep data

TAYBENGH%NUSDISCS.BITNET at CUNYVM.CUNY.EDU TAYBENGH%NUSDISCS.BITNET at CUNYVM.CUNY.EDU
Wed Jun 6 13:28:44 AEST 1990


Dear Mathias,
        The data in the FIFO will only be destroyed when ALL processes close
their FIFO file descriptors (ALL = all writers and readers). Thus, even if
your reader crash in between reading, as long as there is one process having
the FIFO opened, then your reader can read the remaining data in FIFO after
recovery. There is no gurantee when a machine crash since Unix is not
designed to be fault tolerant. Even if a disk buffer is used instead of FIFO,
you still cannot gurantee the data is in disk since write() only buffer your
data in the kernel and postpones the physical updating. Unless u use O_SYNC
to enforce the physical updates, which may slow down your performance a lot.
        By the way, I am also from Singapore. If u would like to discuss
further with me. U can actually call me. My number is : 7726136.
        Hope this helps...
        Good Luck!

- Beng Hang Tay (email: taybengh at nusdiscs)
  Dept. of Info. Sys. and Comp. Sc.
  National University of Singapore (NUS)



More information about the Comp.unix.questions mailing list