1MKFIFO(P)                  POSIX Programmer's Manual                 MKFIFO(P)
2
3
4

NAME

6       mkfifo - make FIFO special files
7

SYNOPSIS

9       mkfifo [-m mode] file...
10

DESCRIPTION

12       The mkfifo utility shall create the FIFO special files specified by the
13       operands, in the order specified.
14
15       For each file operand, the mkfifo utility shall perform actions equiva‐
16       lent  to  the mkfifo() function defined in the System Interfaces volume
17       of IEEE Std 1003.1-2001, called with the following arguments:
18
19        1. The file operand is used as the path argument.
20
21        2. The value of the bitwise-inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP,
22           S_IWGRP, S_IROTH, and S_IWOTH is used as the mode argument. (If the
23           -m option is specified, the value of the mkfifo() mode argument  is
24           unspecified,  but  the  FIFO shall at no time have permissions less
25           restrictive than the -m mode option-argument.)
26

OPTIONS

28       The mkfifo utility shall conform to  the  Base  Definitions  volume  of
29       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
30
31       The following option shall be supported:
32
33       -m  mode
34              Set  the  file  permission bits of the newly-created FIFO to the
35              specified mode value. The mode option-argument shall be the same
36              as  the  mode operand defined for the chmod utility. In the sym‐
37              bolic_mode strings, the op  characters  '+'  and  '-'  shall  be
38              interpreted relative to an assumed initial mode of a= rw.
39
40

OPERANDS

42       The following operand shall be supported:
43
44       file   A pathname of the FIFO special file to be created.
45
46

STDIN

48       Not used.
49

INPUT FILES

51       None.
52

ENVIRONMENT VARIABLES

54       The  following  environment  variables  shall  affect  the execution of
55       mkfifo:
56
57       LANG   Provide a default value for the  internationalization  variables
58              that  are  unset  or  null.  (See the Base Definitions volume of
59              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
60              ables  for the precedence of internationalization variables used
61              to determine the values of locale categories.)
62
63       LC_ALL If set to a non-empty string value, override the values  of  all
64              the other internationalization variables.
65
66       LC_CTYPE
67              Determine  the  locale  for  the  interpretation of sequences of
68              bytes of text data as characters (for  example,  single-byte  as
69              opposed to multi-byte characters in arguments).
70
71       LC_MESSAGES
72              Determine  the  locale  that should be used to affect the format
73              and contents of diagnostic messages written to standard error.
74
75       NLSPATH
76              Determine the location of message catalogs for the processing of
77              LC_MESSAGES .
78
79

ASYNCHRONOUS EVENTS

81       Default.
82

STDOUT

84       Not used.
85

STDERR

87       The standard error shall be used only for diagnostic messages.
88

OUTPUT FILES

90       None.
91

EXTENDED DESCRIPTION

93       None.
94

EXIT STATUS

96       The following exit values shall be returned:
97
98        0     All the specified FIFO special files were created successfully.
99
100       >0     An error occurred.
101
102

CONSEQUENCES OF ERRORS

104       Default.
105
106       The following sections are informative.
107

APPLICATION USAGE

109       None.
110

EXAMPLES

112       None.
113

RATIONALE

115       This utility was added to permit shell applications to create FIFO spe‐
116       cial files.
117
118       The -m option was added to control the file mode, for consistency  with
119       the similar functionality provided by the mkdir utility.
120
121       Early  proposals  included  a  -p option similar to the mkdir -p option
122       that created intermediate directories leading up to the FIFO  specified
123       by  the  final  component.  This was removed because it is not commonly
124       needed and is not common practice with similar utilities.
125
126       The functionality of mkfifo is described substantially through a refer‐
127       ence  to  the  mkfifo()  function  in  the  System Interfaces volume of
128       IEEE Std 1003.1-2001. For example, by default, the  mode  of  the  FIFO
129       file  is affected by the file mode creation mask in accordance with the
130       specified behavior of the mkfifo() function. In this way, there is less
131       duplication  of effort required for describing details of the file cre‐
132       ation.
133

FUTURE DIRECTIONS

135       None.
136

SEE ALSO

138       chmod()   ,   umask()   ,   the    System    Interfaces    volume    of
139       IEEE Std 1003.1-2001, mkfifo()
140
142       Portions  of  this text are reprinted and reproduced in electronic form
143       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
144       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
145       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
146       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
147       event of any discrepancy between this version and the original IEEE and
148       The  Open Group Standard, the original IEEE and The Open Group Standard
149       is the referee document. The original Standard can be  obtained  online
150       at http://www.opengroup.org/unix/online.html .
151
152
153
154IEEE/The Open Group                  2003                            MKFIFO(P)
Impressum