Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkfifo(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(S)

exec(S)

pipe(S)

stat(S)

umask(S)


 mkfifo(S)                      6 January 1993                      mkfifo(S)


 Name

    mkfifo - make a FIFO special file

 Syntax


    cc  . . .  -lc


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

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


 Description

    The mkfifo routine creates a new FIFO special file named by the pathname
    specified by path.  The permissions of the new FIFO are initialized from
    mode.  The file permission bits of the mode argument are modified by the
    process's file creation mask (see umask(S).  When bits in mode other than
    the file permission bits are set, the effect is implementation-defined.

    The FIFO's owner ID is set to the process's effective user ID.  The
    FIFO's group ID is set to the group ID of the directory in which the FIFO
    is being created or to the process's effective group ID.

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

    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.

 Diagnostics

    If any of the following conditions occur, the mkfifo function returns -1
    and sets errno to the corresponding value:

    [EACCES]       A component of the path prefix denies search permission.

    [EEXIST]       The named file already exists.

    [ENAMETOOLONG] The length of the path string exceeds {PATHMAX}, or a
                   pathname component is longer than {NAMEMAX} while
                   {POSIXNOTRUNC} is in effect.

    [ENOENT]       A component of the path prefix does not exist or the path
                   argument points to an empty string.

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

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

    [EROFS]        The named file resides on a read-only file system.


 See also

    chmod(S), exec(S), pipe(S), stat(S), umask(S)

 Standards conformance

    mkfifo is conformant with:
    IEEE POSIX Std 1003.1-1990 System Application Program Interface (API) [C
    Language] (ISO/IEC 9945-1);
    and NIST FIPS 151-1.


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