Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (i - m) mkfifo(3)
NAME
mkfifo - Creates a FIFO special file
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series and J-series native Guardian processes: implicit libraries
H-series and J-series OSS processes: implicit libraries
SYNOPSIS
#include <sys/types.h> /* optional except for POSIX.1 */
#include <sys/stat.h>
int mkfifo(
const char *path,
mode_t mode);
PARAMETERS
path Names the new file. If any component of the path parameter names a symbolic
link, the link will be traversed and pathname resolution will continue.
mode The value of this parameter is constructed by logically ORing flags that are
defined in the sys/stat.h header file. The permission bits are affected by the
value of this parameter but depend on both the support for OSS ACLs on the sys-
tem on which this process is running and on the fileset that contains the new
directory. See "ACL Inheritance" in the acl(5) reference page.
DESCRIPTION
The mkfifo( ) function creates a new FIFO special file with the name pointed to by the path
parameter. The file permission bits of the new FIFO are initialized from the mode parameter.
The file permission bits of the mode parameter are modified by the processs file creation mask
(see the umask( ) reference page).
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 con-
tains the new entry for update.
The group ID of the new FIFO is determined by the value of the S_ISGID flag in the parent
directory. If the S_ISGID flag is set, the group ID is set to the group ID of the parent directory;
otherwise the group ID is set to the effective group ID of the calling process.
Attempting to create a FIFO named lost+found in the root directory of an OSS fileset causes the
mkfifo( ) function to fail with errno set to [EPERM]. If the file already exists, errno is set to
[EEXIST].
If bits in the mode parameter other than the file permission bits or S_IFIFO are set, mkfifo( ) fails
and sets errno to [EINVAL].
Access Control Lists (ACLs)
If the parent directory has an access control list and that ACL contains default ACL entries:
An ACL is created for the new FIFO.
The default ACL entries of the parent directory are copied to the new FIFO both as
actual (nondefault) ACL entries.
Permissions are determined as described in "ACL Inheritance" in the acl(5) reference
page.
527187-017 Hewlett-Packard Company 4199