1MKFIFO(1P) POSIX Programmer's Manual MKFIFO(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 mkfifo — make FIFO special files
13
15 mkfifo [-m mode] file...
16
18 The mkfifo utility shall create the FIFO special files specified by the
19 operands, in the order specified.
20
21 For each file operand, the mkfifo utility shall perform actions equiva‐
22 lent to the mkfifo() function defined in the System Interfaces volume
23 of POSIX.1‐2017, called with the following arguments:
24
25 1. The file operand is used as the path argument.
26
27 2. The value of the bitwise-inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP,
28 S_IWGRP, S_IROTH, and S_IWOTH is used as the mode argument. (If the
29 -m option is specified, the value of the mkfifo() mode argument is
30 unspecified, but the FIFO shall at no time have permissions less
31 restrictive than the -m mode option-argument.)
32
34 The mkfifo utility shall conform to the Base Definitions volume of
35 POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.
36
37 The following option shall be supported:
38
39 -m mode Set the file permission bits of the newly-created FIFO to the
40 specified mode value. The mode option-argument shall be the
41 same as the mode operand defined for the chmod utility. In
42 the symbolic_mode strings, the op characters '+' and '-'
43 shall be interpreted relative to an assumed initial mode of
44 a=rw.
45
47 The following operand shall be supported:
48
49 file A pathname of the FIFO special file to be created.
50
52 Not used.
53
55 None.
56
58 The following environment variables shall affect the execution of
59 mkfifo:
60
61 LANG Provide a default value for the internationalization vari‐
62 ables that are unset or null. (See the Base Definitions vol‐
63 ume of POSIX.1‐2017, Section 8.2, Internationalization Vari‐
64 ables for the precedence of internationalization variables
65 used to determine the values of locale categories.)
66
67 LC_ALL If set to a non-empty string value, override the values of
68 all the other internationalization variables.
69
70 LC_CTYPE Determine the locale for the interpretation of sequences of
71 bytes of text data as characters (for example, single-byte as
72 opposed to multi-byte characters in arguments).
73
74 LC_MESSAGES
75 Determine the locale that should be used to affect the format
76 and contents of diagnostic messages written to standard
77 error.
78
79 NLSPATH Determine the location of message catalogs for the processing
80 of LC_MESSAGES.
81
83 Default.
84
86 Not used.
87
89 The standard error shall be used only for diagnostic messages.
90
92 None.
93
95 None.
96
98 The following exit values shall be returned:
99
100 0 All the specified FIFO special files were created successfully.
101
102 >0 An error occurred.
103
105 Default.
106
107 The following sections are informative.
108
110 None.
111
113 None.
114
116 This utility was added to permit shell applications to create FIFO spe‐
117 cial files.
118
119 The -m option was added to control the file mode, for consistency with
120 the similar functionality provided by the mkdir utility.
121
122 Early proposals included a -p option similar to the mkdir -p option
123 that created intermediate directories leading up to the FIFO specified
124 by the final component. This was removed because it is not commonly
125 needed and is not common practice with similar utilities.
126
127 The functionality of mkfifo is described substantially through a refer‐
128 ence to the mkfifo() function in the System Interfaces volume of
129 POSIX.1‐2017. For example, by default, the mode of the FIFO file is
130 affected by the file mode creation mask in accordance with the speci‐
131 fied behavior of the mkfifo() function. In this way, there is less
132 duplication of effort required for describing details of the file cre‐
133 ation.
134
136 None.
137
139 chmod, umask
140
141 The Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment
142 Variables, Section 12.2, Utility Syntax Guidelines
143
144 The System Interfaces volume of POSIX.1‐2017, mkfifo()
145
147 Portions of this text are reprinted and reproduced in electronic form
148 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
149 table Operating System Interface (POSIX), The Open Group Base Specifi‐
150 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
151 Electrical and Electronics Engineers, Inc and The Open Group. In the
152 event of any discrepancy between this version and the original IEEE and
153 The Open Group Standard, the original IEEE and The Open Group Standard
154 is the referee document. The original Standard can be obtained online
155 at http://www.opengroup.org/unix/online.html .
156
157 Any typographical or formatting errors that appear in this page are
158 most likely to have been introduced during the conversion of the source
159 files to man page format. To report such errors, see https://www.ker‐
160 nel.org/doc/man-pages/reporting_bugs.html .
161
162
163
164IEEE/The Open Group 2017 MKFIFO(1P)