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