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