1. Creation of Pipelines1.1 mkfifo (const char *pathname,mode_t mode);The function has been implicitly specified o_creat| O_EXCL, so it either creates a new FIFO, or returns a eexist error (already present). so in creating a pre-existing FIFO or a new FIFO, you should call Mkfifo and check if the return value is a eexist error, or the Open function if the eexist error. 2.FIFO or pipe reading and writing2.1 write to a pipeline or FIFO always adds data to the end, and read from the pipeline or FIFO is always reading from the beginning. Returns espipe error if Lseek is called on a pipe or FIFO2.2 interprocess Communication note the order of the read-write pipeline to prevent deadlocks. 3. piping or FIFO the deletionafter the pipeline---process is closed, it disappears automatically. FIFO---Called unlink removed from the file system. 4. Atomic operation of pipelines or FIFOAtomic Write Property <=pipe_buf (pipe buffer size) for writes to a pipeline or FIFO, regardless of other properties5 interprocess communicationThe write process closes the pipe or FIFO message through the Read () Return file end descriptor to the reading process. The read process closes a pipeline or FIFO message by passing a signal to the write process.
Techniques of inter-process communication----pipeline and FIFO usage