Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 8

mkfifo()

Create a FIFO special file

Synopsis:

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

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

Arguments:

path
The pathname that you want to use for the FIFO special file.
mode
The file permission bits for the new FIFO. For more information, see Access permissions in the documentation for stat().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The mkfifo() function creates a new FIFO special file named by the pathname pointed to by path. The file permission bits of the new FIFO are initialized from mode, modified by the process's creation mask (see umask()). Bits that are set in mode other than the file permission bits are ignored.

The FIFO owner ID is set to the process's effective user ID and the FIFO's group ID is set to the process's effective group ID.

If mkfifo() succeeds, the st_ftime, st_ctime, st_atime and st_mtime fields of the file are marked for update. Also, the st_ctime and st_mtime fields of the directory that contains the new entry are marked for update.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EACCES
A component of the path prefix denies search permission.
EEXIST
The named file already exists.
ENAMETOOLONG
The length of the path string exceeds PATH_MAX, or a pathname component is longer than NAME_MAX.
ENOENT
A component of the path prefix doesn't exist, or the path arguments points to an empty string.
ENOSPC
The directory that would contain the new file cannot be extended, or the filesystem is out of file allocation resources (that is, the disk is full).
ENOSYS
This function isn't supported for this path.
ENOTDIR
A component of the path prefix isn't a directory.
EROFS
The named file resides on a read-only filesystem.

Examples:

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

int main( void )
{
    (void)mkfifo( "hd/qnx", S_IRUSR | S_IWUSR );

    return EXIT_SUCCESS;
}

Classification:

POSIX 1003.1

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

chmod(), errno, mknod(), pipe(), stat(), umask()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 215

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mkfifo.html on line 215