summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2001-08-09 13:32:13 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2001-08-09 13:32:13 +0000
commitb1250632c5fc76d3b403ef995ee04bf5db2b8493 (patch)
tree251e4417acf32d993acd2d301d7ead7122c562cf
parent91ce3c5b858af828f30bf79525f7e4560f33d2f9 (diff)
Notes
-rw-r--r--lib/libc/compat-43/killpg.25
-rw-r--r--lib/libc/compat-43/sigvec.25
-rw-r--r--lib/libc/gen/msgctl.36
-rw-r--r--lib/libc/gen/msgsnd.35
-rw-r--r--lib/libc/gen/raise.35
-rw-r--r--lib/libc/gen/sem_destroy.37
-rw-r--r--lib/libc/gen/sem_getvalue.37
-rw-r--r--lib/libc/gen/sem_init.37
-rw-r--r--lib/libc/gen/sem_post.37
-rw-r--r--lib/libc/gen/uname.36
-rw-r--r--lib/libc/i386/sys/i386_vm86.28
-rw-r--r--lib/libc/posix1e/acl_free.35
-rw-r--r--lib/libc/posix1e/cap_clear.35
-rw-r--r--lib/libc/posix1e/cap_free.35
-rw-r--r--lib/libc/posix1e/cap_get_flag.35
-rw-r--r--lib/libc/stdio/remove.37
-rw-r--r--lib/libc/stdlib/radixsort.35
-rw-r--r--lib/libc/sys/adjtime.25
-rw-r--r--lib/libc/sys/bind.25
-rw-r--r--lib/libc/sys/close.25
-rw-r--r--lib/libc/sys/connect.25
-rw-r--r--lib/libc/sys/flock.25
-rw-r--r--lib/libc/sys/fsync.23
-rw-r--r--lib/libc/sys/getfh.25
-rw-r--r--lib/libc/sys/getpeername.22
-rw-r--r--lib/libc/sys/getrusage.26
-rw-r--r--lib/libc/sys/getsockname.22
-rw-r--r--lib/libc/sys/kill.25
-rw-r--r--lib/libc/sys/ktrace.25
-rw-r--r--lib/libc/sys/link.25
-rw-r--r--lib/libc/sys/listen.22
-rw-r--r--lib/libc/sys/madvise.26
-rw-r--r--lib/libc/sys/minherit.26
-rw-r--r--lib/libc/sys/mkdir.24
-rw-r--r--lib/libc/sys/mkfifo.24
-rw-r--r--lib/libc/sys/mknod.25
-rw-r--r--lib/libc/sys/mprotect.27
-rw-r--r--lib/libc/sys/msync.24
-rw-r--r--lib/libc/sys/munmap.27
-rw-r--r--lib/libc/sys/pipe.27
-rw-r--r--lib/libc/sys/quotactl.25
-rw-r--r--lib/libc/sys/rename.26
-rw-r--r--lib/libc/sys/revoke.25
-rw-r--r--lib/libc/sys/rmdir.24
-rw-r--r--lib/libc/sys/sched_yield.27
-rw-r--r--lib/libc/sys/semop.26
-rw-r--r--lib/libc/sys/sendfile.26
-rw-r--r--lib/libc/sys/setgroups.24
-rw-r--r--lib/libc/sys/setregid.25
-rw-r--r--lib/libc/sys/shmctl.26
-rw-r--r--lib/libc/sys/sigaction.25
-rw-r--r--lib/libc/sys/sigaltstack.25
-rw-r--r--lib/libc/sys/sigpending.25
-rw-r--r--lib/libc/sys/sigprocmask.25
-rw-r--r--lib/libc/sys/socketpair.22
-rw-r--r--lib/libc/sys/symlink.25
-rw-r--r--lib/libc/sys/undelete.25
-rw-r--r--lib/libc/sys/unlink.25
-rw-r--r--lib/libc_r/man/sem_destroy.37
-rw-r--r--lib/libc_r/man/sem_getvalue.37
-rw-r--r--lib/libc_r/man/sem_init.37
-rw-r--r--lib/libc_r/man/sem_post.37
-rw-r--r--lib/libpthread/man/sem_destroy.37
-rw-r--r--lib/libpthread/man/sem_getvalue.37
-rw-r--r--lib/libpthread/man/sem_init.37
-rw-r--r--lib/libpthread/man/sem_post.37
66 files changed, 66 insertions, 291 deletions
diff --git a/lib/libc/compat-43/killpg.2 b/lib/libc/compat-43/killpg.2
index c8c218caa4073..13b8f06fac8a0 100644
--- a/lib/libc/compat-43/killpg.2
+++ b/lib/libc/compat-43/killpg.2
@@ -66,10 +66,7 @@ the sender must be the super-user.
As a single special case the continue signal SIGCONT may be sent
to any process that is a descendant of the current process.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std killpg
.Sh ERRORS
.Fn Killpg
will fail and no signal will be sent if:
diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2
index 841d37ab8a68f..77dfb67ef9774 100644
--- a/lib/libc/compat-43/sigvec.2
+++ b/lib/libc/compat-43/sigvec.2
@@ -256,10 +256,7 @@ flag is not available in
.Bx 4.2 ,
hence it should not be used if backward compatibility is needed.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigvec
.Sh ERRORS
.Fn Sigvec
will fail and no new signal handler will be installed if one
diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3
index 3e25f79ffdc77..3d1d55a09a913 100644
--- a/lib/libc/gen/msgctl.3
+++ b/lib/libc/gen/msgctl.3
@@ -166,11 +166,7 @@ effective gid can match either
or
.Va msg_perm.gid .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is
-returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std msgctl
.Sh ERRORS
.Fn msgctl
will fail if:
diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3
index ede8ff4a53515..51c39781cb74e 100644
--- a/lib/libc/gen/msgsnd.3
+++ b/lib/libc/gen/msgsnd.3
@@ -121,10 +121,7 @@ is set to the pid of the calling process.
is set to the current time.
.El
.Sh RETURN VALUES
-Upon successful completion, 0 is returned.
-Otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std msgsnd
.Sh ERRORS
.Fn msgsnd
will fail if:
diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3
index 2177fa4a0c2e4..e2d82efa28132 100644
--- a/lib/libc/gen/raise.3
+++ b/lib/libc/gen/raise.3
@@ -55,10 +55,7 @@ function sends the signal
.Fa sig
to the current process.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std raise
.Sh ERRORS
The
.Fn raise
diff --git a/lib/libc/gen/sem_destroy.3 b/lib/libc/gen/sem_destroy.3
index 0de46913728be..29e9bd86c8b58 100644
--- a/lib/libc/gen/sem_destroy.3
+++ b/lib/libc/gen/sem_destroy.3
@@ -49,12 +49,7 @@ After a successful call to
is unuseable until re-initialized by another call to
.Fn sem_init .
.Sh RETURN VALUES
-If successful,
-.Fn sem_destroy
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_destroy
.Sh ERRORS
.Fn sem_destroy
will fail if:
diff --git a/lib/libc/gen/sem_getvalue.3 b/lib/libc/gen/sem_getvalue.3
index 3ee947af7ad86..98674e6c79ee9 100644
--- a/lib/libc/gen/sem_getvalue.3
+++ b/lib/libc/gen/sem_getvalue.3
@@ -49,12 +49,7 @@ as of the time that the call to
.Fn sem_getvalue
is actually run.
.Sh RETURN VALUES
-If successful,
-.Fn sem_getvalue
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_getvalue
.Sh ERRORS
.Fn sem_getvalue
will fail if:
diff --git a/lib/libc/gen/sem_init.3 b/lib/libc/gen/sem_init.3
index 5f43c08e37890..87068adf00380 100644
--- a/lib/libc/gen/sem_init.3
+++ b/lib/libc/gen/sem_init.3
@@ -63,12 +63,7 @@ and
is no longer valid after a successful call to
.Fa sem_destroy .
.Sh RETURN VALUES
-If successful,
-.Fn sem_init
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_init
.Sh ERRORS
.Fn sem_init
will fail if:
diff --git a/lib/libc/gen/sem_post.3 b/lib/libc/gen/sem_post.3
index 0c8dea4934efd..bc0a031204bf1 100644
--- a/lib/libc/gen/sem_post.3
+++ b/lib/libc/gen/sem_post.3
@@ -52,12 +52,7 @@ the semaphore will be allowed to return from
.Fn sem_post
is signal-reentrant and may be called within signal handlers.
.Sh RETURN VALUES
-If successful,
-.Fn sem_post
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_post
.Sh ERRORS
.Fn sem_post
will fail if:
diff --git a/lib/libc/gen/uname.3 b/lib/libc/gen/uname.3
index 0ad18d8885549..9a9d5fe27d8a2 100644
--- a/lib/libc/gen/uname.3
+++ b/lib/libc/gen/uname.3
@@ -69,11 +69,7 @@ Version level of the operating system.
Machine hardware platform.
.El
.Sh RETURN VALUES
-If
-.Fn uname
-is successful, 0 is returned, otherwise, -1 is returned and
-.Va errno
-is set appropriately.
+.Rv -std uname
.Sh ERRORS
The
.Fn uname
diff --git a/lib/libc/i386/sys/i386_vm86.2 b/lib/libc/i386/sys/i386_vm86.2
index 3c85ade2953ec..185b537ea1168 100644
--- a/lib/libc/i386/sys/i386_vm86.2
+++ b/lib/libc/i386/sys/i386_vm86.2
@@ -78,13 +78,7 @@ with the correct machine context for vm86, and with the
.Em PSL_VM
bit set. Control returns to the process upon delivery of a signal.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn i386_vm86
-will return the value of 0.
-Otherwise, a value of -1 is returned and the global
-variable
-.Va errno
-is set to indicate the error.
+.Rv -std i386_vm86
.Sh ERRORS
.Fn i386_vm86
will fail if:
diff --git a/lib/libc/posix1e/acl_free.3 b/lib/libc/posix1e/acl_free.3
index f45c6b38e5fe2..db185af9c8364 100644
--- a/lib/libc/posix1e/acl_free.3
+++ b/lib/libc/posix1e/acl_free.3
@@ -50,10 +50,7 @@ or
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-In the event of success, 0 is returned. In the event of failure, -1 is
-returned, and
-.Va errno
-is set to indicate the error.
+.Rv -std acl_free
.Sh ERRORS
If any of the following conditions occur, the
.Fn acl_free
diff --git a/lib/libc/posix1e/cap_clear.3 b/lib/libc/posix1e/cap_clear.3
index 5f305cb7abae6..fbe8952a87868 100644
--- a/lib/libc/posix1e/cap_clear.3
+++ b/lib/libc/posix1e/cap_clear.3
@@ -52,10 +52,7 @@ implementation shall be cleared.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-shall be set to indicate the error.
+.Rv -std cap_clear
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_clear
diff --git a/lib/libc/posix1e/cap_free.3 b/lib/libc/posix1e/cap_free.3
index 3f6e192607ad4..aed8587c04e62 100644
--- a/lib/libc/posix1e/cap_free.3
+++ b/lib/libc/posix1e/cap_free.3
@@ -57,10 +57,7 @@ function.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-set to indicate the error.
+.Rv -std cap_free
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_free
diff --git a/lib/libc/posix1e/cap_get_flag.3 b/lib/libc/posix1e/cap_get_flag.3
index 1f8ab201dd23e..2493fdad8acd0 100644
--- a/lib/libc/posix1e/cap_get_flag.3
+++ b/lib/libc/posix1e/cap_get_flag.3
@@ -56,10 +56,7 @@ and place it into the location pointed to by
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-set to indicate the error.
+.Rv -std cap_get_flag
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_get_flag
diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3
index a79219f8e5c8a..c463a5558af35 100644
--- a/lib/libc/stdio/remove.3
+++ b/lib/libc/stdio/remove.3
@@ -63,12 +63,7 @@ is the equivalent of
Otherwise, it is the equivalent of
.Fn unlink "path" .
.Sh RETURN VALUES
-Upon successful completion,
-.Fn remove
-returns 0.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std remove
.Sh ERRORS
The
.Fn remove
diff --git a/lib/libc/stdlib/radixsort.3 b/lib/libc/stdlib/radixsort.3
index 90a52c66aa560..04b2007a4533e 100644
--- a/lib/libc/stdlib/radixsort.3
+++ b/lib/libc/stdlib/radixsort.3
@@ -108,10 +108,7 @@ These functions are variants of most-significant-byte radix sorting; in
particular, see D.E. Knuth's Algorithm R and section 5.2.5, exercise 10.
They take linear time relative to the number of bytes in the strings.
.Sh RETURN VALUES
-Upon successful completion 0 is returned.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std radixsort
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EINVAL
diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2
index 359b7ac1b4398..f6a005171d501 100644
--- a/lib/libc/sys/adjtime.2
+++ b/lib/libc/sys/adjtime.2
@@ -84,10 +84,7 @@ The call
.Fn adjtime
is restricted to the super-user.
.Sh RETURN VALUES
-A return value of 0 indicates that the call succeeded.
-A return value of -1 indicates that an error occurred, and in this
-case an error code is stored in the global variable
-.Va errno .
+.Rv -std adjtime
.Sh ERRORS
.Fn Adjtime
will fail if:
diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2
index 56ab9a53cc33e..7024168d74f17 100644
--- a/lib/libc/sys/bind.2
+++ b/lib/libc/sys/bind.2
@@ -86,10 +86,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-If the bind is successful, a 0 value is returned.
-A return value of -1 indicates an error, which is
-further specified in the global
-.Va errno .
+.Rv -std bind
.Sh ERRORS
The
.Fn bind
diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2
index 98c35e07bf895..6a6fb0f53f636 100644
--- a/lib/libc/sys/close.2
+++ b/lib/libc/sys/close.2
@@ -123,10 +123,7 @@ Before returning,
unlocks
.Fa d .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and the global integer variable
-.Va errno
-is set to indicate the error.
+.Rv -std close
.Sh ERRORS
.Fn Close
will fail if:
diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2
index 54adbb2d174ad..eb1c6182cfb88 100644
--- a/lib/libc/sys/connect.2
+++ b/lib/libc/sys/connect.2
@@ -96,10 +96,7 @@ Before returning,
unlocks
.Va s .
.Sh RETURN VALUES
-If the connection or binding succeeds, 0 is returned.
-Otherwise a -1 is returned, and a more specific error
-code is stored in
-.Va errno .
+.Rv -std connect
.Sh ERRORS
The
.Fn connect
diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2
index 5e9ebf6bc4a69..d890bedadcc9e 100644
--- a/lib/libc/sys/flock.2
+++ b/lib/libc/sys/flock.2
@@ -134,10 +134,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-Zero is returned if the operation was successful;
-on an error a -1 is returned and an error code is left in
-the global location
-.Va errno .
+.Rv -std flock
.Sh ERRORS
The
.Fn flock
diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2
index f689c30b6417f..33a0167c06b4f 100644
--- a/lib/libc/sys/fsync.2
+++ b/lib/libc/sys/fsync.2
@@ -78,8 +78,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-A 0 value is returned on success. A -1 value indicates
-an error.
+.Rv -std fsync
.Sh ERRORS
The
.Fn fsync
diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2
index d0ec2ede2d0fd..422c1f6fb8148 100644
--- a/lib/libc/sys/getfh.2
+++ b/lib/libc/sys/getfh.2
@@ -52,10 +52,7 @@ in the file handle pointed to by
.Fa fhp .
This system call is restricted to the superuser.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std getfh
.Sh ERRORS
.Fn Getfh
fails if one or more of the following are true:
diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2
index c409cea0b79e7..28d7a92e18cd3 100644
--- a/lib/libc/sys/getpeername.2
+++ b/lib/libc/sys/getpeername.2
@@ -80,7 +80,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std getpeername
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
index 2d973cbbf6ec7..80e119791297f 100644
--- a/lib/libc/sys/getrusage.2
+++ b/lib/libc/sys/getrusage.2
@@ -152,11 +152,7 @@ account only for real
I/O; data supplied by the caching mechanism is charged only
to the first process to read or write the data.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn getrusage
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std getrusage
.Sh ERRORS
The
.Fn getrusage
diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2
index afaa86ba5b13a..e5b2c3c5048c3 100644
--- a/lib/libc/sys/getsockname.2
+++ b/lib/libc/sys/getsockname.2
@@ -78,7 +78,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std getsockname
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 23bacb05d5a81..1e27caf570ea5 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -106,10 +106,7 @@ is equal to the absolute value of the process number.
This is a variant of
.Xr killpg 2 .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std kill
.Sh ERRORS
.Fn Kill
will fail and no signal will be sent if:
diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2
index fcbf46eee3765..e903ff273b192 100644
--- a/lib/libc/sys/ktrace.2
+++ b/lib/libc/sys/ktrace.2
@@ -135,10 +135,7 @@ The type specific records are defined in the
.Aq Pa sys/ktrace.h
include file.
.Sh RETURN VALUES
-On successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to show the error.
+.Rv -std ktrace
.Sh ERRORS
.Fn Ktrace
will fail if:
diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2
index baea6ebf4ff2a..9c126c94bb067 100644
--- a/lib/libc/sys/link.2
+++ b/lib/libc/sys/link.2
@@ -80,10 +80,7 @@ must be in the same file system.
.Fa name1
may not be a directory.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std link
.Sh ERRORS
.Fn Link
will fail and no link will be created if:
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index b77500a1a7fb0..a9ab96bc6976b 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -107,7 +107,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-A 0 return value indicates success; -1 indicates an error.
+.Rv -std listen
.Sh ERRORS
.Fn Listen
will fail if:
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index e5d6a06b03f02..5ddfa96fad788 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -133,11 +133,7 @@ Region is not included in a core file.
Include region in a core file.
.El
.Sh RETURN VALUES
-Upon successful completion,
-.Fn madvise
-returns 0. Otherwise a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std madvise
.Sh ERRORS
The
.Fn madvise
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2
index 265d6d27fb5e6..96f0ac6754c0b 100644
--- a/lib/libc/sys/minherit.2
+++ b/lib/libc/sys/minherit.2
@@ -56,11 +56,7 @@ Not all implementations will guarantee that the inheritance characteristic
can be set on a page basis;
the granularity of changes may be as large as an entire region.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn minherit
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std minherit
.Sh ERRORS
The
.Fn minherit
diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2
index 5db20748f1723..25fad1ebef34c 100644
--- a/lib/libc/sys/mkdir.2
+++ b/lib/libc/sys/mkdir.2
@@ -58,9 +58,7 @@ The directory's owner ID is set to the process's effective user ID.
The directory's group ID is set to that of the parent directory in
which it is created.
.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
+.Rv -std mkdir
.Sh ERRORS
.Fn Mkdir
will fail and no directory will be created if:
diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2
index 2a606cbb68dd5..c711690083a61 100644
--- a/lib/libc/sys/mkfifo.2
+++ b/lib/libc/sys/mkfifo.2
@@ -60,9 +60,7 @@ 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.
.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
+.Rv -std mkfifo
.Sh ERRORS
.Fn Mkfifo
will fail and no fifo will be created if:
diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2
index 27d48b09f7419..a81c1aaad9e56 100644
--- a/lib/libc/sys/mknod.2
+++ b/lib/libc/sys/mknod.2
@@ -64,10 +64,7 @@ is ignored.
.Fn Mknod
requires super-user privileges.
.Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std mknod
.Sh ERRORS
.Fn Mknod
will fail and the file will be not created if:
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index 7f46d241c8392..fe8df3039d499 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -54,12 +54,7 @@ changes the specified pages to have protection
Not all implementations will guarantee protection on a page basis;
the granularity of protection changes may be as large as an entire region.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn mprotect
-returns 0. Otherwise a value of -1 is returned
-and
-.Va errno
-is set to indicate the error.
+.Rv -std mprotect
.Sh ERRORS
The
.Fn mprotect
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
index 38fda84c9b5cf..9adc3acd919ae 100644
--- a/lib/libc/sys/msync.2
+++ b/lib/libc/sys/msync.2
@@ -72,9 +72,7 @@ MS_SYNC Perform synchronous writes
MS_INVALIDATE Invalidate all cached data
.Ed
.Sh RETURN VALUES
-If any errors occur, -1 is returned and errno is set to indicate the
-error.
-Otherwise, a 0 value is returned.
+.Rv -std msync
.Sh ERRORS
.Fn msync
will fail if:
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index 230ec4bdccf8b..1644730029348 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -53,12 +53,7 @@ deletes the mappings for the specified address range,
and causes further references to addresses within the range
to generate invalid memory references.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn munmap
-returns zero.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std munmap
.Sh ERRORS
.Fn Munmap
will fail if:
diff --git a/lib/libc/sys/pipe.2 b/lib/libc/sys/pipe.2
index 5bbc5634b6975..52f0f98bece84 100644
--- a/lib/libc/sys/pipe.2
+++ b/lib/libc/sys/pipe.2
@@ -88,12 +88,7 @@ portable to older systems, so it is recommended to use the convention
for using the endpoints in the traditional manner when using a
pipe in one direction.
.Sh RETURN VALUES
-On successful creation of the pipe, zero is returned.
-Otherwise,
-a value of -1 is returned and the variable
-.Va errno
-set to indicate the
-error.
+.Rv -std pipe
.Sh ERRORS
The
.Fn pipe
diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2
index 6fe4a094decc6..9aa5a481efe65 100644
--- a/lib/libc/sys/quotactl.2
+++ b/lib/libc/sys/quotactl.2
@@ -151,10 +151,7 @@ and
parameters are ignored.
.El
.Sh RETURN VALUES
-A successful call returns 0,
-otherwise the value -1 is returned and the global variable
-.Va errno
-indicates the reason for the failure.
+.Rv -std quotactl
.Sh ERRORS
A
.Fn quotactl
diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2
index 41edfafc3d140..8d5523a1c00a2 100644
--- a/lib/libc/sys/rename.2
+++ b/lib/libc/sys/rename.2
@@ -98,11 +98,7 @@ not the file or directory to which it points.
.\"Hard links to directories should be
.\"replaced by symbolic links by the system administrator.
.Sh RETURN VALUES
-A 0 value is returned if the operation succeeds, otherwise
-.Fn rename
-returns -1 and the global variable
-.Va errno
-indicates the reason for the failure.
+.Rv -std rename
.Sh ERRORS
.Fn Rename
will fail and neither of the argument files will be
diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2
index d89d50c8e1643..8b6b01d584899 100644
--- a/lib/libc/sys/revoke.2
+++ b/lib/libc/sys/revoke.2
@@ -73,10 +73,7 @@ device files.
It is normally used to prepare a terminal device for a new login session,
preventing any access by a previous user of the terminal.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std revoke
.Sh ERRORS
Access to the named file is revoked unless one of the following:
.Bl -tag -width Er
diff --git a/lib/libc/sys/rmdir.2 b/lib/libc/sys/rmdir.2
index d637c93e16814..373b185800c9b 100644
--- a/lib/libc/sys/rmdir.2
+++ b/lib/libc/sys/rmdir.2
@@ -55,9 +55,7 @@ than
and
.Ql \&.. .
.Sh RETURN VALUES
-A 0 is returned if the remove succeeds; otherwise a -1 is
-returned and an error code is stored in the global location
-.Va errno .
+.Rv -std rmdir
.Sh ERRORS
The named file is removed unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/sched_yield.2 b/lib/libc/sys/sched_yield.2
index ee5c123fbb494..2d8240cd8f534 100644
--- a/lib/libc/sys/sched_yield.2
+++ b/lib/libc/sys/sched_yield.2
@@ -41,12 +41,7 @@ The
function forces the running process to relinquish the processor until it
again becomes the head of its process list. It takes no arguments.
.Sh RETURN VALUES
-The
-.Fn sched_yield
-function will return zero if it completes successfully, or it
-will return a value of -1 and set
-.Va errno
-to indicate the error.
+.Rv -std sched_yield
.Sh ERRORS
On failure
.Va errno
diff --git a/lib/libc/sys/semop.2 b/lib/libc/sys/semop.2
index 3ead1dc08511d..7f18510d89c6e 100644
--- a/lib/libc/sys/semop.2
+++ b/lib/libc/sys/semop.2
@@ -163,11 +163,7 @@ for each semaphore is added to the semaphore's value. This can
be used to insure that a resource is released if a process terminates
unexpectedly.
.Sh RETURN VALUES
-On success,
-.Fn semop
-returns 0; otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std semop
.Sh ERRORS
.Fn Semop
will fail if:
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2
index e9d17b862dc2f..24296c2d041da 100644
--- a/lib/libc/sys/sendfile.2
+++ b/lib/libc/sys/sendfile.2
@@ -132,11 +132,7 @@ unlocks
and
.Fa s .
.Sh RETURN VALUES
-Upon successful completion,
-.Fn sendfile
-returns 0. Otherwise a -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std sendfile
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EBADF
diff --git a/lib/libc/sys/setgroups.2 b/lib/libc/sys/setgroups.2
index 668b3dc6a49f8..3ba324dd3cf0b 100644
--- a/lib/libc/sys/setgroups.2
+++ b/lib/libc/sys/setgroups.2
@@ -60,9 +60,7 @@ as defined in
.Pp
Only the super-user may set new groups.
.Sh RETURN VALUES
-A 0 value is returned on success, -1 on error, with
-an error code stored in
-.Va errno .
+.Rv -std setgroups
.Sh ERRORS
The
.Fn setgroups
diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2
index 358920bcc7c76..196534933a0d9 100644
--- a/lib/libc/sys/setregid.2
+++ b/lib/libc/sys/setregid.2
@@ -74,10 +74,7 @@ the standard
.Fn setgid
function is preferred.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std setregid
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EPERM
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2
index 9288bb5ce547f..e3ab92cf296d5 100644
--- a/lib/libc/sys/shmctl.2
+++ b/lib/libc/sys/shmctl.2
@@ -109,11 +109,7 @@ struct shmid_ds {
};
.Ed
.Sh RETURN VALUES
-Upon successful completion,
-.Fn shmctl
-returns 0. Otherwise, it returns -1 and
-.Va errno
-is set to indicate the error.
+.Rv -std shmctl
.Sh ERRORS
.Fn Shmctl
will fail if:
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 762aa45206ab3..877445e60f129 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -448,10 +448,7 @@ This protects against the side effect of
.Va errno
being set by functions called from inside the signal handler.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigaction
.Sh EXAMPLES
There are three possible prototypes the handler may match:
.Bl -tag -offset indent -width short
diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2
index d69b34b7e03d3..e39b8930636bc 100644
--- a/lib/libc/sys/sigaltstack.2
+++ b/lib/libc/sys/sigaltstack.2
@@ -133,10 +133,7 @@ are not ``grown'' automatically as is done for the normal stack.
If the stack overflows and this space is not protected
unpredictable results may occur.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std sigaltstack
.Sh ERRORS
.Fn Sigaltstack
will fail and the signal stack context will remain unchanged
diff --git a/lib/libc/sys/sigpending.2 b/lib/libc/sys/sigpending.2
index 361a91898199b..8ab927bb2dc14 100644
--- a/lib/libc/sys/sigpending.2
+++ b/lib/libc/sys/sigpending.2
@@ -57,10 +57,7 @@ Signals may be pending because they are currently masked,
or transiently before delivery (although the latter case is not
normally detectable).
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigpending
.Sh ERRORS
.Fn sigpending
will fail if:
diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2
index ff60beb2291d1..a7bf788883a02 100644
--- a/lib/libc/sys/sigprocmask.2
+++ b/lib/libc/sys/sigprocmask.2
@@ -96,10 +96,7 @@ or
.Dv SIGSTOP
to be blocked.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A -1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigprocmask
.Sh ERRORS
The
.Fn sigprocmask
diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2
index 1c5a15f391b28..875aea04b37a2 100644
--- a/lib/libc/sys/socketpair.2
+++ b/lib/libc/sys/socketpair.2
@@ -62,7 +62,7 @@ and
.Fa sv Ns [1] .
The two sockets are indistinguishable.
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std socketpair
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2
index ea3ca385b7556..175ce9fecd890 100644
--- a/lib/libc/sys/symlink.2
+++ b/lib/libc/sys/symlink.2
@@ -58,10 +58,7 @@ used in creating the symbolic link).
Either name may be an arbitrary path name; the files need not
be on the same file system.
.Sh RETURN VALUES
-Upon successful completion, a zero value is returned.
-If an error occurs, the error code is stored in
-.Va errno
-and a -1 value is returned.
+.Rv -std symlink
.Sh ERRORS
The symbolic link succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2
index b9ba8af6e11b0..2fae4fc8cca0a 100644
--- a/lib/libc/sys/undelete.2
+++ b/lib/libc/sys/undelete.2
@@ -61,10 +61,7 @@ Eventually, the
functionality may be expanded to other filesystems able to recover
deleted files such as the log-structured filesystem.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std undelete
.Sh ERRORS
The
.Fn undelete
diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2
index c547825a0ad3e..2b5e3cb725f2c 100644
--- a/lib/libc/sys/unlink.2
+++ b/lib/libc/sys/unlink.2
@@ -62,10 +62,7 @@ all references to it have been closed.
.Fa path
may not be a directory.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std unlink
.Sh ERRORS
The
.Fn unlink
diff --git a/lib/libc_r/man/sem_destroy.3 b/lib/libc_r/man/sem_destroy.3
index 0de46913728be..29e9bd86c8b58 100644
--- a/lib/libc_r/man/sem_destroy.3
+++ b/lib/libc_r/man/sem_destroy.3
@@ -49,12 +49,7 @@ After a successful call to
is unuseable until re-initialized by another call to
.Fn sem_init .
.Sh RETURN VALUES
-If successful,
-.Fn sem_destroy
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_destroy
.Sh ERRORS
.Fn sem_destroy
will fail if:
diff --git a/lib/libc_r/man/sem_getvalue.3 b/lib/libc_r/man/sem_getvalue.3
index 3ee947af7ad86..98674e6c79ee9 100644
--- a/lib/libc_r/man/sem_getvalue.3
+++ b/lib/libc_r/man/sem_getvalue.3
@@ -49,12 +49,7 @@ as of the time that the call to
.Fn sem_getvalue
is actually run.
.Sh RETURN VALUES
-If successful,
-.Fn sem_getvalue
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_getvalue
.Sh ERRORS
.Fn sem_getvalue
will fail if:
diff --git a/lib/libc_r/man/sem_init.3 b/lib/libc_r/man/sem_init.3
index 5f43c08e37890..87068adf00380 100644
--- a/lib/libc_r/man/sem_init.3
+++ b/lib/libc_r/man/sem_init.3
@@ -63,12 +63,7 @@ and
is no longer valid after a successful call to
.Fa sem_destroy .
.Sh RETURN VALUES
-If successful,
-.Fn sem_init
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_init
.Sh ERRORS
.Fn sem_init
will fail if:
diff --git a/lib/libc_r/man/sem_post.3 b/lib/libc_r/man/sem_post.3
index 0c8dea4934efd..bc0a031204bf1 100644
--- a/lib/libc_r/man/sem_post.3
+++ b/lib/libc_r/man/sem_post.3
@@ -52,12 +52,7 @@ the semaphore will be allowed to return from
.Fn sem_post
is signal-reentrant and may be called within signal handlers.
.Sh RETURN VALUES
-If successful,
-.Fn sem_post
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_post
.Sh ERRORS
.Fn sem_post
will fail if:
diff --git a/lib/libpthread/man/sem_destroy.3 b/lib/libpthread/man/sem_destroy.3
index 0de46913728be..29e9bd86c8b58 100644
--- a/lib/libpthread/man/sem_destroy.3
+++ b/lib/libpthread/man/sem_destroy.3
@@ -49,12 +49,7 @@ After a successful call to
is unuseable until re-initialized by another call to
.Fn sem_init .
.Sh RETURN VALUES
-If successful,
-.Fn sem_destroy
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_destroy
.Sh ERRORS
.Fn sem_destroy
will fail if:
diff --git a/lib/libpthread/man/sem_getvalue.3 b/lib/libpthread/man/sem_getvalue.3
index 3ee947af7ad86..98674e6c79ee9 100644
--- a/lib/libpthread/man/sem_getvalue.3
+++ b/lib/libpthread/man/sem_getvalue.3
@@ -49,12 +49,7 @@ as of the time that the call to
.Fn sem_getvalue
is actually run.
.Sh RETURN VALUES
-If successful,
-.Fn sem_getvalue
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_getvalue
.Sh ERRORS
.Fn sem_getvalue
will fail if:
diff --git a/lib/libpthread/man/sem_init.3 b/lib/libpthread/man/sem_init.3
index 5f43c08e37890..87068adf00380 100644
--- a/lib/libpthread/man/sem_init.3
+++ b/lib/libpthread/man/sem_init.3
@@ -63,12 +63,7 @@ and
is no longer valid after a successful call to
.Fa sem_destroy .
.Sh RETURN VALUES
-If successful,
-.Fn sem_init
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_init
.Sh ERRORS
.Fn sem_init
will fail if:
diff --git a/lib/libpthread/man/sem_post.3 b/lib/libpthread/man/sem_post.3
index 0c8dea4934efd..bc0a031204bf1 100644
--- a/lib/libpthread/man/sem_post.3
+++ b/lib/libpthread/man/sem_post.3
@@ -52,12 +52,7 @@ the semaphore will be allowed to return from
.Fn sem_post
is signal-reentrant and may be called within signal handlers.
.Sh RETURN VALUES
-If successful,
-.Fn sem_post
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_post
.Sh ERRORS
.Fn sem_post
will fail if: