Working with Named Pipes

Pipes allow processes to to communicate with each other. A pipe may also be known as a "FIFO" (First In, First Out).

The following is an example on how to create a named pipe, named here as pipe1.

To send a message to the pipe, use:

The process will appear to be hung at this point. There is no other process running to collect the data, so the kernel suspends the process. The process is said to be "blocked" at this stage. (["No Waiting for a fifo process"])

On another terminal, it is possible to collect the data from the pipe, as follows:

The data from the pipe will now be received, and the "blocked" process will be free to resume.


["Atomic Writes to Named Pipes"]