MKFIFO(1) General Commands Manual MKFIFO(1)

mkfifomake fifo special files

mkfifo [-m mode] file ...

The mkfifo utility shall create the FIFO special files specified by the operands, in the order specified. For each file operand, the mkfifo utility shall perform actions equivalent to the POSIX. 1 {8} mkfifo function, called with the following arguments:

  1. The file operand is used as the path argument.
  2. The value of the bitwise inclusive OR of , , , , , and is used as the mode argument. (If the −m option is specified, the mode option-argument overrides this default.)

The mkfifo utility shall conform to the utility argument syntax guidelines described in 2.10.2. The following option shall be supported by the implementation:

mode

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 the chmod utility (see chmod(1) ). In the symbolic_mode strings, the op characters + and - shall be interpreted relative to an assumed initial mode of a=rw.

The following operand shall be supported by the implementation:

file

A pathname of the FIFO special file to be created.

None.

None.

The following environment variables shall affect the execution of mkfifo:

This variable shall determine the locale to use for the locale categories when both LC_ALL and the corresponding environment variable (beginning with LC_ ) do not specify a locale. See 2.6.

This variable shall determine the locale to be used to override any values for locale categories specified by the settings of LANG or any environment variables beginning with LC_.

This variable shall determine the locale for the interpretation of sequences of bytes of text data as characters (e.g., single- versus multibyte characters in arguments).

This variable shall determine the language in which messages should be written.

Default.

None.

Used only for diagnostic messages.

None.

None.

The mkfifo utility shall exit with one of the following values:

All the specified FIFO special files were created successfully.

An error occurred.

Default.

None.

This new utility was added to permit shell applications to create FIFO special files. The −m option was added to control the file mode, for consistency with the similar functionality provided the mkdir utility. Earlier drafts included a −p option similar to mkdir’s −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. The functionality of mkfifo is described substantially through a reference to the mkfifo function in POSIX. 1. 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 POSIX. 1 {8} mkfifo. In this way, there is less duplication of effort required for describing details of the file creation.

September 1991 posix.fail