Commit | Line | Data |
---|---|---|
e1d4f580 KM |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms are permitted | |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)mkfifo.2 6.1 (Berkeley) %G% | |
17 | .\" | |
18 | .TH MKFIFO 2 "" | |
19 | .UC 7 | |
20 | .SH NAME | |
21 | mkfifo \- make a fifo file | |
22 | .SH SYNOPSIS | |
23 | .nf | |
24 | .ft B | |
25 | mkfifo(path, mode) | |
26 | char *path; | |
27 | int mode; | |
28 | .fi | |
29 | .ft R | |
30 | .SH DESCRIPTION | |
31 | .I Mkfifo | |
32 | creates a new fifo file with name | |
33 | .IR path . | |
34 | The mode of the new file | |
35 | is initialized from | |
36 | .IR mode . | |
37 | (The protection part of the mode | |
38 | is modified by the process's mode mask; see | |
39 | .IR umask (2)). | |
40 | .PP | |
41 | The fifo's owner ID is set to the process's effective user ID. | |
42 | The fifo's group ID is set to that of the parent directory in | |
43 | which it is created. | |
44 | .PP | |
45 | The low-order 9 bits of mode are modified by the process's | |
46 | file mode creation mask: all bits set in the process's file mode | |
47 | creation mask are cleared. See | |
48 | .IR umask (2). | |
49 | .SH "RETURN VALUE | |
50 | A 0 return value indicates success. A \-1 return value | |
51 | indicates an error, and an error code is stored in | |
52 | .I errno. | |
53 | .SH "ERRORS | |
54 | .I Mkfifo | |
55 | will fail and no fifo will be created if: | |
56 | .TP 15 | |
57 | [ENOTSUPP] | |
58 | The kernel has not been configured to support fifo's. | |
59 | .TP 15 | |
60 | [ENOTDIR] | |
61 | A component of the path prefix is not a directory. | |
62 | .TP 15 | |
63 | [EINVAL] | |
64 | The pathname contains a character with the high-order bit set. | |
65 | .TP 15 | |
66 | [ENAMETOOLONG] | |
67 | A component of a pathname exceeded 255 characters, | |
68 | or an entire path name exceeded 1023 characters. | |
69 | .TP 15 | |
70 | [ENOENT] | |
71 | A component of the path prefix does not exist. | |
72 | .TP 15 | |
73 | [EACCES] | |
74 | Search permission is denied for a component of the path prefix. | |
75 | .TP 15 | |
76 | [ELOOP] | |
77 | Too many symbolic links were encountered in translating the pathname. | |
78 | .TP 15 | |
79 | [EPERM] | |
80 | The \fIpath\fP argument contains a byte with the high-order bit set. | |
81 | .TP 15 | |
82 | [EROFS] | |
83 | The named file resides on a read-only file system. | |
84 | .TP 15 | |
85 | [EEXIST] | |
86 | The named file exists. | |
87 | .TP 15 | |
88 | [ENOSPC] | |
89 | The directory in which the entry for the new fifo is being placed | |
90 | cannot be extended because there is no space left on the file | |
91 | system containing the directory. | |
92 | .TP 15 | |
93 | [ENOSPC] | |
94 | There are no free inodes on the file system on which the | |
95 | fifo is being created. | |
96 | .TP 15 | |
97 | [EDQUOT] | |
98 | The directory in which the entry for the new fifo | |
99 | is being placed cannot be extended because the | |
100 | user's quota of disk blocks on the file system | |
101 | containing the directory has been exhausted. | |
102 | .TP 15 | |
103 | [EDQUOT] | |
104 | The user's quota of inodes on the file system on | |
105 | which the fifo is being created has been exhausted. | |
106 | .TP 15 | |
107 | [EIO] | |
108 | An I/O error occurred while making the directory entry or allocating the inode. | |
109 | .TP 15 | |
110 | [EIO] | |
111 | An I/O error occurred while reading from or writing to the file system. | |
112 | .TP 15 | |
113 | [EFAULT] | |
114 | .I Path | |
115 | points outside the process's allocated address space. | |
116 | .SH "SEE ALSO" | |
117 | chmod(2), stat(2), umask(2) |