NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO
#include <sys/types.h> #include <sys/stat.h>int mkfifo(const char *path, mode_t mode);
The mkfifo() function creates a new FIFO special file named by the pathname pointed to by path. The mode of the new FIFO is initialized from mode. The file permission bits of the mode argument are modified by the process's file creation mask (see umask(2)). Bits other than the file permission bits in mode are ignored.
The FIFO's owner id is set to the process's effective user ID. The FIFO's group ID is set to the process's effective group ID, or if the S_ISGID bit is set in the parent directory then the group ID of the FIFO is inherited from the parent directory.
The mkfifo() function calls mknod(2) to make the file.
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | MT-Safe |
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO