1 .\" This man page is Copyright (C) 1999 Claus Fischer.
3 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
4 .\" Permission is granted to distribute possibly modified copies
5 .\" of this page provided the header is included verbatim,
6 .\" and in case of nontrivial modification author and date
7 .\" of the modification is added to the header.
10 .\" 990620 - page created - aeb@cwi.nl
12 .TH FIFO 7 2016-12-12 "Linux" "Linux Programmer's Manual"
14 fifo \- first-in first-out special file, named pipe
16 A FIFO special file (a named pipe) is similar to a pipe,
17 except that it is accessed as part of the filesystem.
18 It can be opened by multiple processes for reading or
20 When processes are exchanging data via the FIFO,
21 the kernel passes all data internally without writing it
23 Thus, the FIFO special file has no
24 contents on the filesystem; the filesystem entry merely
25 serves as a reference point so that processes can access
26 the pipe using a name in the filesystem.
28 The kernel maintains exactly one pipe object for each
29 FIFO special file that is opened by at least one process.
30 The FIFO must be opened on both ends (reading and writing)
31 before data can be passed.
32 Normally, opening the FIFO blocks
33 until the other end is opened also.
35 A process can open a FIFO in nonblocking mode.
37 case, opening for read-only will succeed even if no-one has
38 opened on the write side yet and opening for write-only will
41 (no such device or address) unless the other
42 end has already been opened.
44 Under Linux, opening a FIFO for read and write will succeed
45 both in blocking and nonblocking mode.
48 This can be used to open a FIFO for
49 writing while there are no readers available.
51 that uses both ends of the connection in order to communicate
52 with itself should be very careful to avoid deadlocks.
54 When a process tries to write to a FIFO that is not opened
55 for read on the other side, the process is sent a
59 FIFO special files can be created by
63 with the file type \(aqp\(aq.