.TH mkfifo() "" "" "System Call (libc)"
.PC "Create a FIFO"
.B "#include <sys/types.h>"
.B "#include <unistd.h>"
\fBint mkfifo(\fIpath\^\fB, \fImode\^\fB)\fR
\fBconst char *\fIpath\^\fB; mode_t \fImode\^\fB;\fR
.PP
.II FIFO
.B mkfifo()
calls
.B mknod()
to create a FIFO.
.I path
points to the full path name of the FIFO to create.
.I mode
gives the mode into which the FIFO is to be opened.
.B mkfifo()
ignores the bits in
.I mode
other than the file-permission bits.
The file permission bits of
.I mode
are modified by the process's file-creation mask;
for details, see the Lexicon entry for \fBumask()\fR.
.PP
.B mkfifo()
sets the ownership of the file FIFO's to the process's effective user
identifier,
and sets the FIFO's group identifier to the process's effective group
identifier.
.PP
If all goes well,
.B mkfifo()
returns zero.
If an error occurs,
it returns \-1 and sets
.B errno
to an appropriate value.
.SH "See Also"
.Xr "libc," libc
.Xr "libsocket," libsocket
.Xr "named pipe," named_pip
.Xr "pipe()," pipe.s
.Xr "unistd.h" unistd.h
.br
\*(PX Standard, \(sc5.4.2
