Commit | Line | Data |
---|---|---|
931b8415 | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
e1d4f580 KM |
2 | .\" All rights reserved. |
3 | .\" | |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
e1d4f580 | 5 | .\" |
931b8415 | 6 | .\" @(#)mkfifo.2 6.3 (Berkeley) %G% |
e1d4f580 | 7 | .\" |
931b8415 CL |
8 | .Dd |
9 | .Dt MKFIFO 2 | |
10 | .Os BSD 4.4 | |
11 | .Sh NAME | |
12 | .Nm mkfifo | |
13 | .Nd make a fifo file | |
14 | .Sh SYNOPSIS | |
15 | .Fd #include <sys/stat.h> | |
16 | .Ft int | |
17 | .Fn mkfifo "const char *path" "mode_t mode" | |
18 | .Sh DESCRIPTION | |
19 | .Fn Mkfifo | |
e1d4f580 | 20 | creates a new fifo file with name |
931b8415 CL |
21 | .Fa path . |
22 | The access permissions are | |
23 | specified by | |
24 | .Fa mode | |
25 | and restricted by the | |
26 | .Xr umask 2 | |
27 | of the calling process. | |
28 | .Pp | |
e1d4f580 KM |
29 | The fifo's owner ID is set to the process's effective user ID. |
30 | The fifo's group ID is set to that of the parent directory in | |
31 | which it is created. | |
931b8415 CL |
32 | .Sh RETURN VALUES |
33 | A 0 return value indicates success. A -1 return value | |
e1d4f580 | 34 | indicates an error, and an error code is stored in |
931b8415 CL |
35 | .Va errno . |
36 | .Sh ERRORS | |
37 | .Fn Mkfifo | |
e1d4f580 | 38 | will fail and no fifo will be created if: |
931b8415 CL |
39 | .Bl -tag -width ENAMETOOLO |
40 | .It Bq Er ENOTSUPP | |
e1d4f580 | 41 | The kernel has not been configured to support fifo's. |
931b8415 | 42 | .It Bq Er ENOTDIR |
e1d4f580 | 43 | A component of the path prefix is not a directory. |
931b8415 | 44 | .It Bq Er EINVAL |
e1d4f580 | 45 | The pathname contains a character with the high-order bit set. |
931b8415 | 46 | .It Bq Er ENAMETOOLONG |
e1d4f580 KM |
47 | A component of a pathname exceeded 255 characters, |
48 | or an entire path name exceeded 1023 characters. | |
931b8415 | 49 | .It Bq Er ENOENT |
e1d4f580 | 50 | A component of the path prefix does not exist. |
931b8415 | 51 | .It Bq Er EACCES |
e1d4f580 | 52 | Search permission is denied for a component of the path prefix. |
931b8415 | 53 | .It Bq Er ELOOP |
e1d4f580 | 54 | Too many symbolic links were encountered in translating the pathname. |
931b8415 CL |
55 | .It Bq Er EPERM |
56 | The | |
57 | .Fa path | |
58 | argument contains a byte with the high-order bit set. | |
59 | .It Bq Er EROFS | |
e1d4f580 | 60 | The named file resides on a read-only file system. |
931b8415 | 61 | .It Bq Er EEXIST |
e1d4f580 | 62 | The named file exists. |
931b8415 | 63 | .It Bq Er ENOSPC |
e1d4f580 KM |
64 | The directory in which the entry for the new fifo is being placed |
65 | cannot be extended because there is no space left on the file | |
66 | system containing the directory. | |
931b8415 | 67 | .It Bq Er ENOSPC |
e1d4f580 KM |
68 | There are no free inodes on the file system on which the |
69 | fifo is being created. | |
931b8415 | 70 | .It Bq Er EDQUOT |
e1d4f580 KM |
71 | The directory in which the entry for the new fifo |
72 | is being placed cannot be extended because the | |
73 | user's quota of disk blocks on the file system | |
74 | containing the directory has been exhausted. | |
931b8415 | 75 | .It Bq Er EDQUOT |
e1d4f580 KM |
76 | The user's quota of inodes on the file system on |
77 | which the fifo is being created has been exhausted. | |
931b8415 | 78 | .It Bq Er EIO |
e1d4f580 | 79 | An I/O error occurred while making the directory entry or allocating the inode. |
931b8415 | 80 | .It Bq Er EIO |
e1d4f580 | 81 | An I/O error occurred while reading from or writing to the file system. |
931b8415 CL |
82 | .It Bq Er EFAULT |
83 | .Fa Path | |
e1d4f580 | 84 | points outside the process's allocated address space. |
931b8415 CL |
85 | .El |
86 | .Sh SEE ALSO | |
87 | .Xr chmod 2 , | |
88 | .Xr stat 2 , | |
89 | .Xr umask 2 | |
90 | .Sh STANDARDS | |
91 | .Fn Mkfifo | |
92 | conforms to IEEE Std 1003.1-1988 | |
93 | .Pq Dq Tn POSIX . |