xref: /csrg-svn/lib/libc/sys/mkfifo.2 (revision 40165)
Copyright (c) 1990 The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

@(#)mkfifo.2 6.1 (Berkeley) 02/20/90

MKFIFO 2 ""
C 7
NAME
mkfifo - make a fifo file
SYNOPSIS
mkfifo(path, mode)
char *path;
int mode;
DESCRIPTION
Mkfifo creates a new fifo file with name path . The mode of the new file is initialized from mode . (The protection part of the mode is modified by the process's mode mask; see umask (2)).

The fifo's owner ID is set to the process's effective user ID. The fifo's group ID is set to that of the parent directory in which it is created.

The low-order 9 bits of mode are modified by the process's file mode creation mask: all bits set in the process's file mode creation mask are cleared. See umask (2).

"RETURN VALUE
A 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno.
"ERRORS
Mkfifo will fail and no fifo will be created if:

15 [ENOTSUPP] The kernel has not been configured to support fifo's.

15 [ENOTDIR] A component of the path prefix is not a directory.

15 [EINVAL] The pathname contains a character with the high-order bit set.

15 [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters.

15 [ENOENT] A component of the path prefix does not exist.

15 [EACCES] Search permission is denied for a component of the path prefix.

15 [ELOOP] Too many symbolic links were encountered in translating the pathname.

15 [EPERM] The path argument contains a byte with the high-order bit set.

15 [EROFS] The named file resides on a read-only file system.

15 [EEXIST] The named file exists.

15 [ENOSPC] The directory in which the entry for the new fifo is being placed cannot be extended because there is no space left on the file system containing the directory.

15 [ENOSPC] There are no free inodes on the file system on which the fifo is being created.

15 [EDQUOT] The directory in which the entry for the new fifo is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted.

15 [EDQUOT] The user's quota of inodes on the file system on which the fifo is being created has been exhausted.

15 [EIO] An I/O error occurred while making the directory entry or allocating the inode.

15 [EIO] An I/O error occurred while reading from or writing to the file system.

15 [EFAULT] Path points outside the process's allocated address space.

"SEE ALSO"
chmod(2), stat(2), umask(2)