minor error inspec
[unix-history] / usr / src / lib / libc / sys / mkfifo.2
CommitLineData
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
21mkfifo \- make a fifo file
22.SH SYNOPSIS
23.nf
24.ft B
25mkfifo(path, mode)
26char *path;
27int mode;
28.fi
29.ft R
30.SH DESCRIPTION
31.I Mkfifo
32creates a new fifo file with name
33.IR path .
34The mode of the new file
35is initialized from
36.IR mode .
37(The protection part of the mode
38is modified by the process's mode mask; see
39.IR umask (2)).
40.PP
41The fifo's owner ID is set to the process's effective user ID.
42The fifo's group ID is set to that of the parent directory in
43which it is created.
44.PP
45The low-order 9 bits of mode are modified by the process's
46file mode creation mask: all bits set in the process's file mode
47creation mask are cleared. See
48.IR umask (2).
49.SH "RETURN VALUE
50A 0 return value indicates success. A \-1 return value
51indicates an error, and an error code is stored in
52.I errno.
53.SH "ERRORS
54.I Mkfifo
55will fail and no fifo will be created if:
56.TP 15
57[ENOTSUPP]
58The kernel has not been configured to support fifo's.
59.TP 15
60[ENOTDIR]
61A component of the path prefix is not a directory.
62.TP 15
63[EINVAL]
64The pathname contains a character with the high-order bit set.
65.TP 15
66[ENAMETOOLONG]
67A component of a pathname exceeded 255 characters,
68or an entire path name exceeded 1023 characters.
69.TP 15
70[ENOENT]
71A component of the path prefix does not exist.
72.TP 15
73[EACCES]
74Search permission is denied for a component of the path prefix.
75.TP 15
76[ELOOP]
77Too many symbolic links were encountered in translating the pathname.
78.TP 15
79[EPERM]
80The \fIpath\fP argument contains a byte with the high-order bit set.
81.TP 15
82[EROFS]
83The named file resides on a read-only file system.
84.TP 15
85[EEXIST]
86The named file exists.
87.TP 15
88[ENOSPC]
89The directory in which the entry for the new fifo is being placed
90cannot be extended because there is no space left on the file
91system containing the directory.
92.TP 15
93[ENOSPC]
94There are no free inodes on the file system on which the
95fifo is being created.
96.TP 15
97[EDQUOT]
98The directory in which the entry for the new fifo
99is being placed cannot be extended because the
100user's quota of disk blocks on the file system
101containing the directory has been exhausted.
102.TP 15
103[EDQUOT]
104The user's quota of inodes on the file system on
105which the fifo is being created has been exhausted.
106.TP 15
107[EIO]
108An I/O error occurred while making the directory entry or allocating the inode.
109.TP 15
110[EIO]
111An I/O error occurred while reading from or writing to the file system.
112.TP 15
113[EFAULT]
114.I Path
115points outside the process's allocated address space.
116.SH "SEE ALSO"
117chmod(2), stat(2), umask(2)