MKFIFO(1P)
π MKFIFO(1P) π
okay bestie, gather round, because we're about to talk about mkfifo from the POSIX Programmer's Manual (that's the 1P bit in the corner, iykyk) π
β¨ PROLOG β¨
so like, real talk first π«Ά this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β so if you're on Linux, go read the corresponding Linux manual page for the actual details of Linux behavior. And lowkey? The interface might not even be implemented on Linux at all. So check, bestie. Always check. π
πΈ NAME πΈ
mkfifo β make FIFO special files β¨
π SYNOPSIS π
mkfifo [-m mode] file...
π¦ DESCRIPTION π¦
The mkfifo utility shall create the FIFO special files specified by the operands, in the order specified. In order. In the order. Not vibes order, the specified order. π
For each file operand, the mkfifo utility shall perform actions equivalent to the mkfifo() function defined in the System Interfaces volume of POSIX.1β2017, called with the following arguments:
- The file operand is used as the path argument.
- The value of the bitwise-inclusive OR of
S_IRUSR,S_IWUSR,S_IRGRP,S_IWGRP,S_IROTH, andS_IWOTHis used as the mode argument. (If the-moption is specified, the value of themkfifo()mode argument is unspecified, but the FIFO shall at no time have permissions less restrictive than the-mmode option-argument.)
not me casually dropping six permission constants in one sentence π that's a bitwise-inclusive OR, bestie, it's giving "all the standard permission bits at once". Periodt.
π OPTIONS π
The mkfifo utility shall conform to the Base Definitions volume of POSIX.1β2017, Section 12.2, Utility Syntax Guidelines. (Yes, there are rules. There are always rules. Respect the guidelines. π)
The following option shall be supported:
-mmode β Set the file permission bits of the newly-created FIFO to the specified mode value. The mode option-argument shall be the same as the mode operand defined for thechmodutility. In the symbolic_mode strings, the op characters'+'and'-'shall be interpreted relative to an assumed initial mode ofa=rw.
so when you go symbolic, just know the starting point is a=rw. That's the assumption. Don't fight it, just work with it. π
π OPERANDS π
The following operand shall be supported:
- file β A pathname of the FIFO special file to be created.
π STDIN π
Not used. Nope. Nothing. Not a single byte. π
π§ INPUT FILES π§
None. Zero. Nada. β¨
π ENVIRONMENT VARIABLES π
The following environment variables shall affect the execution of mkfifo:
LANGβ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ If set to a non-empty string value, override the values of all the other internationalization variables.LC_CTYPEβ Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESβ Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.NLSPATHβ Determine the location of message catalogs for the processing ofLC_MESSAGES.
the locale girlies really said "we're everywhere" and honestly? iconic. π
β ASYNCHRONOUS EVENTS β
Default. β¨
π STDOUT π
Not used. Silent. Mysterious. Main character energy, honestly. π€«
πΈ STDERR πΈ
The standard error shall be used only for diagnostic messages.
π OUTPUT FILES π
None. π¦
π EXTENDED DESCRIPTION π
None. We keep it simple around here. β¨
π₯ EXIT STATUS π₯
The following exit values shall be returned:
0β All the specified FIFO special files were created successfully. π slay.>0β An error occurred. π
π CONSEQUENCES OF ERRORS π
Default.
The following sections are informative. (Read: the lore. The backstory. The commentary. Not the rules, but the reasons. π)
π APPLICATION USAGE π
None. β¨
π§ EXAMPLES π§
None. (I know. I know. I wanted examples too. But there are literally none here, bestie. We suffer together. π)
π RATIONALE π
This utility was added to permit shell applications to create FIFO special files. That's the whole reason. Shell girlies needed their pipes. π«Ά
The -m option was added to control the file mode, for consistency with the similar functionality provided by the mkdir utility. Consistency is the vibe. π
Early proposals included a -p option similar to the mkdir -p option that created intermediate directories leading up to the FIFO specified by the final component. This was removed because it is not commonly needed and is not common practice with similar utilities. so yeah. gone. deleted. no cap. π
The functionality of mkfifo is described substantially through a reference to the mkfifo() function in the System Interfaces volume of POSIX.1β2017. For example, by default, the mode of the FIFO file is affected by the file mode creation mask in accordance with the specified behavior of the mkfifo() function. In this way, there is less duplication of effort required for describing details of the file creation. Efficiency! We love her! π
π¦ FUTURE DIRECTIONS π¦
None. β¨
π SEE ALSO π
chmod, umask
The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
The System Interfaces volume of POSIX.1β2017, mkfifo()
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! π this lil legend is brought to you by IEEE/The Open Group, dated 2017, and it's the MKFIFO(1P) page from the POSIX Programmer's Manual. go make some FIFOs, you absolute icon πβ¨πΈ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- 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-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms