Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / lib / libcr / sys / mkfifo.2
1 .\" Copyright (c) 1990, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)mkfifo.2    8.1 (Berkeley) 6/4/93
33 .\" $FreeBSD: src/lib/libc/sys/mkfifo.2,v 1.9.2.6 2001/12/14 18:34:01 ru Exp $
34 .\" $DragonFly: src/lib/libcr/sys/Attic/mkfifo.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
35 .\"
36 .Dd June 4, 1993
37 .Dt MKFIFO 2
38 .Os
39 .Sh NAME
40 .Nm mkfifo
41 .Nd make a fifo file
42 .Sh LIBRARY
43 .Lb libc
44 .Sh SYNOPSIS
45 .In sys/types.h
46 .In sys/stat.h
47 .Ft int
48 .Fn mkfifo "const char *path" "mode_t mode"
49 .Sh DESCRIPTION
50 .Fn Mkfifo
51 creates a new fifo file with name
52 .Fa path .
53 The access permissions are
54 specified by
55 .Fa mode
56 and restricted by the
57 .Xr umask 2
58 of the calling process.
59 .Pp
60 The fifo's owner ID is set to the process's effective user ID.
61 The fifo's group ID is set to that of the parent directory in
62 which it is created.
63 .Sh RETURN VALUES
64 .Rv -std mkfifo
65 .Sh ERRORS
66 .Fn Mkfifo
67 will fail and no fifo will be created if:
68 .Bl -tag -width Er
69 .It Bq Er ENOTSUP
70 The kernel has not been configured to support fifo's.
71 .It Bq Er ENOTDIR
72 A component of the path prefix is not a directory.
73 .It Bq Er ENAMETOOLONG
74 A component of a pathname exceeded 255 characters,
75 or an entire path name exceeded 1023 characters.
76 .It Bq Er ENOENT
77 A component of the path prefix does not exist.
78 .It Bq Er EACCES
79 Search permission is denied for a component of the path prefix.
80 .It Bq Er ELOOP
81 Too many symbolic links were encountered in translating the pathname.
82 .It Bq Er EROFS
83 The named file resides on a read-only file system.
84 .It Bq Er EEXIST
85 The named file exists.
86 .It Bq Er ENOSPC
87 The directory in which the entry for the new fifo is being placed
88 cannot be extended because there is no space left on the file
89 system containing the directory.
90 .It Bq Er ENOSPC
91 There are no free inodes on the file system on which the
92 fifo is being created.
93 .It Bq Er EDQUOT
94 The directory in which the entry for the new fifo
95 is being placed cannot be extended because the
96 user's quota of disk blocks on the file system
97 containing the directory has been exhausted.
98 .It Bq Er EDQUOT
99 The user's quota of inodes on the file system on
100 which the fifo is being created has been exhausted.
101 .It Bq Er EIO
102 An
103 .Tn I/O
104 error occurred while making the directory entry or allocating the inode.
105 .It Bq Er EIO
106 An
107 .Tn I/O
108 error occurred while reading from or writing to the file system.
109 .It Bq Er EFAULT
110 .Fa Path
111 points outside the process's allocated address space.
112 .El
113 .Sh SEE ALSO
114 .Xr chmod 2 ,
115 .Xr mknod 2 ,
116 .Xr stat 2 ,
117 .Xr umask 2
118 .Sh STANDARDS
119 The
120 .Fn mkfifo
121 function call is expected to conform to
122 .St -p1003.1-90 .