summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/mkfifo.2
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-04-16 13:03:12 +0000
committerkib <kib@FreeBSD.org>2008-04-16 13:03:12 +0000
commit2e4b86adc7ebc6a6f218f0ad58bf2e06954acd0d (patch)
tree03acdbf3f7e88a48d315dac76d504fadeac388b0 /lib/libc/sys/mkfifo.2
parent52243403eb48561abd7b33995f5a4be6a56fa1f0 (diff)
downloadFreeBSD-src-2e4b86adc7ebc6a6f218f0ad58bf2e06954acd0d.zip
FreeBSD-src-2e4b86adc7ebc6a6f218f0ad58bf2e06954acd0d.tar.gz
Man pages for the openat(2), fexecve(2) and related syscalls.
Reviewed by: ru
Diffstat (limited to 'lib/libc/sys/mkfifo.2')
-rw-r--r--lib/libc/sys/mkfifo.260
1 files changed, 58 insertions, 2 deletions
diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2
index 2011924..9b4ac5d 100644
--- a/lib/libc/sys/mkfifo.2
+++ b/lib/libc/sys/mkfifo.2
@@ -28,11 +28,12 @@
.\" @(#)mkfifo.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd December 10, 2006
+.Dd April 10, 2008
.Dt MKFIFO 2
.Os
.Sh NAME
-.Nm mkfifo
+.Nm mkfifo ,
+.Nm mkfifoat
.Nd make a fifo file
.Sh LIBRARY
.Lb libc
@@ -41,6 +42,8 @@
.In sys/stat.h
.Ft int
.Fn mkfifo "const char *path" "mode_t mode"
+.Ft int
+.Fn mkfifoat "int fd" "const char *path" "mode_t mode"
.Sh DESCRIPTION
The
.Fn mkfifo
@@ -57,6 +60,27 @@ of the calling process.
The fifo's owner ID is set to the process's effective user ID.
The fifo's group ID is set to that of the parent directory in
which it is created.
+.Pp
+The
+.Fn mkfifoat
+system call is equivalent to
+.Fn mkfifo
+except in the case where
+.Fa path
+specifies a relative path.
+In this case the newly created FIFO is created relative to the
+directory associated with the file descriptor
+.Fa fd
+instead of the current working directory.
+If
+.Fn mkfifoat
+is passed the special value
+.Dv AT_FDCWD
+in the
+.Fa fd
+parameter, the current working directory is used and the behavior is
+identical to a call to
+.Fn mkfifo .
.Sh RETURN VALUES
.Rv -std mkfifo
.Sh ERRORS
@@ -116,6 +140,30 @@ The
argument
points outside the process's allocated address space.
.El
+.Pp
+In addition to the errors returned by the
+.Fn mkfifo ,
+the
+.Fn mkfifoat
+may fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa path
+argument does not specify an absolute path and the
+.Fa fd
+argument is neither
+.Dv AT_FDCWD
+nor a valid file descriptor open for searching.
+.It Bq Er ENOTDIR
+The
+.Fa path
+argument is not an absolute path and
+.Fa fd
+is neither
+.Dv AT_FDCWD
+nor a file descriptor associated with a directory.
+.El
.Sh SEE ALSO
.Xr chflags 2 ,
.Xr chmod 2 ,
@@ -127,3 +175,11 @@ The
.Fn mkfifo
system call is expected to conform to
.St -p1003.1-90 .
+The
+.Fn mkfifoat
+system call follows The Open Group Extended API Set 2 specification.
+.Sh HISTORY
+The
+.Fn mkfifoat
+system call appeared in
+.Fx 8.0 .
OpenPOWER on IntegriCloud