(1) What are named pipes, unnamed pipes?
Unnamed pipes: can only be used between two related processes, and these two related processes also have a common primary process that creates them.
Named pipes: FIFO, unrelated processes can also exchange data.
(2) FIFO is a file type.
Creating a FIFO is similar to creating a file, and the path name of the FIFO exists with the file system.
(3)
The function Mkfifo,mkfifoat creates a FIFO and opens it with open (the effect of the O_nonblock non-blocking flag).
Applications can create FIFO with the Mknod and Mknodat functions.
(4) FIFO has two purposes.
1) Copy the output stream from a series of shell commands. For example, a filtered input stream needs to be processed two times (separately).
(implemented by the TEE program: This program copies its standard input to its standard output and to the file named in its command line)
2) Use FIFO for client process-server process pass.
15th. Inter-process pass 15.5 FIFO