Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

User Commands (m - o) mkfifo(1)
NAME
mkfifo - Makes FIFO special files
SYNOPSIS
mkfifo [-m mode] file ...
The mkfifo utility creates FIFO special files in the order specified.
FLAGS
-m mode Sets the file permission bits of the new file to the specified mode value, after creating
the FIFO special file. The mode argument is a symbolic mode string (see chmod), in
which the operator characters + (plus sign) and - (minus) are interpreted relative to the
default file mode for that file type. The + character adds permissions to the default
mode, and - deletes permissions from the default mode.
The default mode is a=rw (permissions of rw-rw-rw).
DESCRIPTION
For each file argument, mkfifo performs actions equivalent to the mkfifo() call with the following
arguments:
1. The file argument is used as the pathname argument.
2. The value of the bitwise inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP,
S_IROTH, and S_IWOTH is used as the mode argument.
Access Control Lists (ACLs)
If the parent directory has an ACL that contains default ACL entries, the new directory inherits
ACL entries and permissions as described in the acl(5) reference page.
EXAMPLES
1. To create a FIFO special file with permissions prw-r--r--,enter:
mkfifo
-m 644 /tmp/myfifo
The command creates the /tmp/myfifo file with read/write permissions for the owner and
read permission for the group and for others.
2. To create a FIFO special file using the - (minus) operand to set permissions of prw-r-----,
enter:
mkfifo
-m g-w,o-rw /tmp/fifo2
The command creates the /tmp/fifo2 file, removing write permission for the group and all
permissions for others.
EXIT VALUES
The mkfifo utility exits with one of the following values:
0 Indicates that all the specified FIFO special files were created successfully.
>0 Indicates that an error occurred.
RELATED INFORMATION
Commands: mknod(8), setacl(1).
Functions: acl(2), chmod(2), mkdir(2), mkfifo(3), mknod(2), umask(2).
Miscellaneous topics: acl(5).
527188-021 Hewlett-Packard Company 619