Named pipe

From LQWiki
Jump to navigation Jump to search

A named pipe is special type of file used to provide one-way communications between two processes. Also known as a FIFO for its First-in-first-out behavior.

Typical use

A named pipe is generally created with mkfifo or mknod. One process open the file read-only, while another open it write-only. By default, the first open will block until the second process opens the pipe. The process that opened the pipe write-only can then write data into the pipe. The other process will receive this data when it reads from the pipe.

See also

FIFO