up | Inhaltsverzeichniss | Kommentar

Manual page for MKFIFO(2P)

mkfifo - (POSIX only) make a FIFO special file

SYNOPSIS

#include <sys/types.h>
#include <sys/stat.h>

int mkfifo(const char *path, mode_t mode);

DESCRIPTION

The information in this specification applies only to POSIX applications.

The mkfifo function creates a new FIFO special file whose pathname is pointed to by path. The mode of the new file (including special file bits) is initialized from mode, modified by the process's mode mask (see umask.2

The owner ID of the new FIFO is set to the effective user ID of the calling process. The group ID of the FIFO is set to the group ID of the directory in which the FIFO is created.

Upon successful completion, the mkfifo function marks for update the st_atime, st_ctime and st_mtime fields of the file, and the st_ctime and st_mtime fields of the directory in which the FIFO is created.

RETURN VALUE

Upon successful completion a value of zero is returned. Otherwise, a value of -1 is returned, no FIFO is created and errno is set to indicate the error.

ERRORS

If any of the following conditions occurs, the mkfifo function returns -1 and sets errno to the corresponding value:
[EACCES]
Search permission is denied for a component of the path prefix.
[EACCES]
Write permission is denied on the parent directory of the FIFO to be created.
[EFAULT]
The path argument points outside the process's allocated address space.
[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.
[EDQUOT]
The user's quota of inodes on the file system on which the FIFO is being created has been exhausted.
[EEXIST]
The named file exists.
[EINVAL]
The pathname contains a character with the high-order bit set.
[EIO]
An I/O error occurred while making the directory entry or allocating the inode.
[ELOOP]
Too many symbolic links were encountered in translating the pathname.
[ENAMETOOLONG]
A component of path exceeds {NAME_MAX} (see <limits.h>) characters, or the entire pathname exceeds {PATH_MAX} (see <limits.h>) characters.
[ENOENT]
A component of the path prefix does not exist.
[ENOENT]
The path points to an empty string.
[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.
[ENOSPC]
There are no free inodes on the file system on which the FIFO is being created.
[ENOTDIR]
A component of the path prefix is not a directory.
[EPERM]
The pathname contains a character with the high-order bit set.
[EROFS]
The named file resides on a read-only file system.

SEE ALSO

chmod(2), pipe(2), stat(2P), umask(2)


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97