Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

PXFMKFIFO

POSIX Subroutine: Creates a new FIFO. This routine is only available for Linux.

Module

USE IFPOSIX

CALL PXFMKFIFO (path,ilen,imode,ierror)

path

(Input) Character. The path for the new FIFO.

ilen

(Input) INTEGER(4). The length of path string.

imode

(Input) INTEGER(4). The mode mask; specifies the FIFO's permissions. Octal file-access mode.

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code.

The PXFMKFIFO subroutine creates a FIFO special file with name path. A FIFO special file is similar to a pipe, except that it is created in a different way. Once a FIFO special file is created, any process can open it for reading or writing in the same way as an ordinary file.

However, the FIFO file has to be open at both ends simultaneously before you can proceed to do any input or output operations on it. Opening a FIFO for reading normally blocks it until some other process opens the same FIFO for writing, and vice versa.

See Also