Format
mkfifo [–m mode] file [–p]
Description
mkfifo creates
one or more FIFO special files with the given names.
Options
- –m mode
- Lets you specify file permissions for the files. The mode argument
can have the same value as the mode argument
for chmod; see chmod for
more details.
- –p
- Creates intermediate directory components that do not already
exist. For example, if one of the file arguments is dir/subdir/file and
if subdir does not exist already, this option creates it. Such
intermediate directories are created with mode bits determined in
the following way: Take a default mode setting 777 (a=rwx), apply
the umask setting of the process to it, and then turn on user read,
write, and user execute permissions (u+rwx).
The –m mode specification
on the command line is not used for computing the mode of intermediate
directories. The resulting mode settings permit the file owner to
access the new files without concern for any umask setting that may
be in place.
Localization
mkfifo uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
See Localization for more
information.
Exit values
- 0
- Successful completion
- 1
- Failure due to any of the following:
- A missing mode after –m
- An incorrect mode:
- An incorrect command-line option
- A missing filename
- Inability to create the desired file
Portability
POSIX.2, X/Open Portability Guide, UNIX systems.
The –p option
is an extension of the POSIX standard.
Related information
chmod, create, mkdir