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