MKFIFO(3) BSD MKFIFO(3)
NAME
mkfifo - Creates a FIFO
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int mkfifo (path, mode)
const char *path;
mode_t mode ;
DESCRIPTION
The mkfifo function creates a FIFO special file.
path names the new file.
mode Specifies the type, attributes, and access permissions of the file.
The file permission bits of the mode argument are modified by the
process' file creation mask (see umask(2)).
The FIFO's owner ID will be set to the process' effective user ID. The
FIFO's group ID is set to the group ID of the parent directory.
Upon successful completion, the mkfifo function marks the st_atime,
st_ctime, and st_mtime fields of the file for update, and sets the
st_ctime and st_mtime fields of the directory that contains the new entry
for update.
DIAGNOSTICS
Upon successful completion of mkfifo, a value of 0 (zero) is returned.
Otherwise, a value of -1 is returned and errno is set to indicate the
error.
ERRORS
If the mkfifo function fails, the new file is not created and errno may
be set to one of the following values:
[EACCES] A component of the path prefix denies search permission, or
write permission is denied on the parent directory of the FIFO
to be created.
[EEXIST] The named file exists.
[EROFS] The directory in which the file is to be created is located on
a read-only file system.
[ENOSPC] The directory that would contain the new file cannot be
extended or the file system is out of file allocation
resources.
[ENAMETOOLONG]
The length of the path argument exceeds PATH_MAX or a pathname
component is longer than NAME_MAX.
[ENOENT] A component of the path prefix does not exist or the path
argument points to an empty string.
[ENOTDIR] A component of the path prefix is not a directory.
[EIO] An I/O error occurred while writing to the file system.
[EFAULT] path points outside the process' allocated address space.
SEE ALSO
chmod(2), mkdir(2), mknod(2), open(2), stat(2), umask(2) chmod(1),
mkdir(1)