xref: /csrg-svn/lib/libc/sys/mkfifo.2 (revision 61183)
1*61183Sbostic.\" Copyright (c) 1990, 1991, 1993
2*61183Sbostic.\"	The Regents of the University of California.  All rights reserved.
340165Smckusick.\"
450487Scael.\" %sccs.include.redist.roff%
540165Smckusick.\"
6*61183Sbostic.\"	@(#)mkfifo.2	8.1 (Berkeley) 06/04/93
740165Smckusick.\"
847208Scael.Dd
947208Scael.Dt MKFIFO 2
1050487Scael.Os
1147208Scael.Sh NAME
1247208Scael.Nm mkfifo
1347208Scael.Nd make a fifo file
1447208Scael.Sh SYNOPSIS
1547208Scael.Fd #include <sys/stat.h>
1647208Scael.Ft int
1747208Scael.Fn mkfifo "const char *path" "mode_t mode"
1847208Scael.Sh DESCRIPTION
1947208Scael.Fn Mkfifo
2040165Smckusickcreates a new fifo file with name
2147208Scael.Fa path .
2247208ScaelThe access permissions are
2347208Scaelspecified by
2447208Scael.Fa mode
2547208Scaeland restricted by the
2647208Scael.Xr umask 2
2747208Scaelof the calling process.
2847208Scael.Pp
2940165SmckusickThe fifo's owner ID is set to the process's effective user ID.
3040165SmckusickThe fifo's group ID is set to that of the parent directory in
3140165Smckusickwhich it is created.
3247208Scael.Sh RETURN VALUES
3347208ScaelA 0 return value indicates success.  A -1 return value
3440165Smckusickindicates an error, and an error code is stored in
3547208Scael.Va errno .
3647208Scael.Sh ERRORS
3747208Scael.Fn Mkfifo
3840165Smckusickwill fail and no fifo will be created if:
3947208Scael.Bl -tag -width ENAMETOOLO
4047208Scael.It Bq Er ENOTSUPP
4140165SmckusickThe kernel has not been configured to support fifo's.
4247208Scael.It Bq Er ENOTDIR
4340165SmckusickA component of the path prefix is not a directory.
4447208Scael.It Bq Er EINVAL
4540165SmckusickThe pathname contains a character with the high-order bit set.
4647208Scael.It Bq Er ENAMETOOLONG
4740165SmckusickA component of a pathname exceeded 255 characters,
4840165Smckusickor an entire path name exceeded 1023 characters.
4947208Scael.It Bq Er ENOENT
5040165SmckusickA component of the path prefix does not exist.
5147208Scael.It Bq Er EACCES
5240165SmckusickSearch permission is denied for a component of the path prefix.
5347208Scael.It Bq Er ELOOP
5440165SmckusickToo many symbolic links were encountered in translating the pathname.
5547208Scael.It Bq Er EPERM
5647208ScaelThe
5747208Scael.Fa path
5847208Scaelargument contains a byte with the high-order bit set.
5947208Scael.It Bq Er EROFS
6040165SmckusickThe named file resides on a read-only file system.
6147208Scael.It Bq Er EEXIST
6240165SmckusickThe named file exists.
6347208Scael.It Bq Er ENOSPC
6440165SmckusickThe directory in which the entry for the new fifo is being placed
6540165Smckusickcannot be extended because there is no space left on the file
6640165Smckusicksystem containing the directory.
6747208Scael.It Bq Er ENOSPC
6840165SmckusickThere are no free inodes on the file system on which the
6940165Smckusickfifo is being created.
7047208Scael.It Bq Er EDQUOT
7140165SmckusickThe directory in which the entry for the new fifo
7240165Smckusickis being placed cannot be extended because the
7340165Smckusickuser's quota of disk blocks on the file system
7440165Smckusickcontaining the directory has been exhausted.
7547208Scael.It Bq Er EDQUOT
7640165SmckusickThe user's quota of inodes on the file system on
7740165Smckusickwhich the fifo is being created has been exhausted.
7847208Scael.It Bq Er EIO
7950487ScaelAn
8050487Scael.Tn I/O
8150487Scaelerror occurred while making the directory entry or allocating the inode.
8247208Scael.It Bq Er EIO
8350487ScaelAn
8450487Scael.Tn I/O
8550487Scaelerror occurred while reading from or writing to the file system.
8647208Scael.It Bq Er EFAULT
8747208Scael.Fa Path
8840165Smckusickpoints outside the process's allocated address space.
8947208Scael.El
9047208Scael.Sh SEE ALSO
9147208Scael.Xr chmod 2 ,
9247208Scael.Xr stat 2 ,
9347208Scael.Xr umask 2
9447208Scael.Sh STANDARDS
9550487ScaelThe
9650487Scael.Nm mkfifo
9750487Scaelfunction call conforms to
9850487Scael.St -p1003.1-88 .
99