Home > PHP > Function > POSIX > posix_mkfifo()

posix_mkfifo()

posix_mkfifo - Create a fifo special file (a named pipe)

Syntax

bool posix_mkfifo (string $pathname, int $mode)

Arguments

  • pathname - Path to the FIFOfile.
  • mode - The second parameter mode has to be given in octal notation (e.g. 0644). The permission of the newly created FIFOalso depends on the setting of the current umask(). The permissions of the created file are (mode & ~umask).

Description

posix_mkfifo() creates a special FIFOfile which exists in the file system and acts as a bidirectional communication endpoint for processes.

Version

PHP 4, 5

Return value

Returns TRUE on success or FALSE on failure.