fifo(7)

okay so bestie, you opened fifo(7) from the Miscellaneous Information Manual and honestly? you're about to have a great time. this is the named-pipe page. it's short, it's iconic, it's giving plumbing-but-make-it-filesystem. let's go ๐Ÿ’…

โœจ NAME โœจ

fifo โ€” first-in first-out special file, also known as a named pipe ๐ŸŽ€


๐Ÿ’– DESCRIPTION ๐Ÿ’–

A FIFO special file (a named pipe, bestie, same thing) is literally just like a pipe, except that you access it as part of the filesystem. that's the whole plot twist ๐ŸŒˆ

It can be opened by multiple processes for reading or for writing. yes, plural. it's a group chat, not a DM.

When processes are exchanging data via the FIFO, the kernel passes all the data internally without writing it to the filesystem. so no, nothing is being saved to disk. the FIFO special file has no contents on the filesystem โ€” the filesystem entry is genuinely just a reference point, a lil name tag so processes can find the pipe using a name in the filesystem. it's giving โœจ name-only, no baggage โœจ

The kernel maintains exactly one pipe object for each FIFO special file that is opened by at least one process. one FIFO, one pipe object. no cap.

The FIFO must be opened on both ends โ€” reading and writing โ€” before any data can be passed. and normally, opening the FIFO blocks until the other end is opened too. so yeah, it's waiting for its other half. it's giving soulmate behavior ๐Ÿ˜ญ๐Ÿซถ

A process can also open a FIFO in nonblocking mode. here's the tea:

  • opening for read-only succeeds even if nobody has opened on the write side yet ๐ŸŽ‰
  • opening for write-only fails with ENXIO (no such device or address) unless the other end has already been opened ๐Ÿ’€

Under Linux, opening a FIFO for read and write will succeed in both blocking and nonblocking mode. POSIX leaves this behavior undefined โ€” so like, technically that's a Linux flex, don't assume everyone does it.

This trick can be used to open a FIFO for writing while there are no readers available. BUT โ€” a process that uses both ends of the connection in order to communicate with itself should be very careful to avoid deadlocks. like, be so serious about that. deadlocks are not cute, they're just a bad time ๐Ÿ™ˆ


๐ŸŒธ NOTES ๐ŸŒธ

For all the deets on the semantics of I/O on FIFOs, go read pipe(7). it's the sequel, the source material, the blueprint ๐Ÿ“š

When a process tries to write to a FIFO that is not opened for read on the other side, the process is sent a SIGPIPE signal. no reader? signal. periodt. ๐Ÿ’€

FIFO special files can be created by mkfifo(3), and they show up in ls -l marked with the file type 'p'. yes, that lil p at the start of the permissions line is your sign. iykyk ๐Ÿ‘‘


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


okay that's the whole page, you ate that ๐Ÿ“ this diva of a man page is from Linux man-pages 6.20, dated 2026-02-08, and it's for fifo(7). mwah, go make a named pipe bestie ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: Linux-man-pages-1-para
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms