Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkfifo(3C) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mkdir(1)

chmod(2)

exec(2)

mknod(2)

umask(2)

fs(4)

stat(5)

types(5)

mkfifo(3C)                                                       mkfifo(3C)

NAME
     mkfifo - create a new FIFO special file

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

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

DESCRIPTION
     The mkfifo() routine creates a new FIFO special file named by the
     pathname pointed to by path. The mode of the new FIFO special file is
     initialized from mode. The file permission bits of the mode argument
     are modified by the process' file creation mask [see umask(2)].

     When bits in mode other than the file permission bits are set, the
     effect is implementation-dependent.

     The owner id of the FIFO special file is set to the process' effective
     user id. The group id of the FIFO special file is set to the process'
     effective group id, or if the SISGID bit is set in the parent direc-
     tory then the group id of the FIFO is inherited from the parent.

     Upon successful completion, mkfifo() will mark for update the
     statime, stctime and stmtime fields of the file. Also, the stctime
     and stmtime fields of the directory that contains the new entry are
     marked for update.

     mkfifo() calls the system call mknod() to make the file.

ERRORS
     The following error code descriptions are function-specific. You will
     find a general description in introprm2(2) or in errno(5).

     mkfifo() (or mknod()) will fail and not generate a new file if one of
     the following applies:

     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 already exists.

     ELOOP         Too many symbolic links were encountered in resolving
                   path.

     ENAMETOOLONG  The length of the path argument exceeds PATHMAX, or the
                   length of a component of path exceeds NAMEMAX.

     ENOSPC        The directory that would contain the new file cannot be
                   extended or the file system is out of file-allocation
                   resources.



Page 1                       Reliant UNIX 5.44                Printed 11/98

mkfifo(3C)                                                       mkfifo(3C)

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

     ENOENT        A component of the path prefix does not exist or is an
                   empty pathname.

     EROFS         The directory in which the file is to be created is on a
                   read-only file system.

     The mkfifo() function may fail if:

     ENAMETOOLONG  Pathname resolution of a symbolic link produced an
                   intermediate result whose length exceeds PATHMAX.

RESULT
     Upon successful completion a value of 0 is returned. Otherwise, a
     value of -1 is returned and errno is set to indicate the error.

NOTES
     Bits other than the file permission bits in mode are ignored.

SEE ALSO
     mkdir(1), chmod(2), exec(2), mknod(2), umask(2), fs(4), stat(5),
     types(5).































Page 2                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026