In what sense is it a FIFO? Is it a pipe on the file system, one created in C with pipe, some implementation of a queue, or something else? What happens to the FIFO after "STOP", e.g. does this close the descriptor or leave it open? If it's a proper FIFO (i.e. Unix pipe) then the reading end would just read until it blocks, or read until some sort of "STOP" indicator was read (maybe a null byte.) If it's a FIFO tied to the file system then both ends could close it, then open it up again. Any other implementation entirely depends on how it's constructed.
ta0kira
|