diff options
author | 2019-05-26 09:47:28 +0000 | |
---|---|---|
committer | 2019-05-26 09:47:28 +0000 | |
commit | e939ddac22443fb9cc8f0494725caebb62b0747f (patch) | |
tree | c4174684b7871ed3c90b9a80f6f3557ef9fc813c /lib/libc | |
parent | Allow specifying area by number as well as id. No changes to outputs. (diff) | |
download | wireguard-openbsd-e939ddac22443fb9cc8f0494725caebb62b0747f.tar.xz wireguard-openbsd-e939ddac22443fb9cc8f0494725caebb62b0747f.zip |
Tweak "RETURN VALUES" sections to mention setting errno, as so many
other man pages do.
ok schwarze@ guenther@ on socket(2). "Similar" tweak on accept(2)
requested by guenther@.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/accept.2 | 15 | ||||
-rw-r--r-- | lib/libc/sys/socket.2 | 12 |
2 files changed, 18 insertions, 9 deletions
diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2 index 5ac01c80ebf..99f31686ff8 100644 --- a/lib/libc/sys/accept.2 +++ b/lib/libc/sys/accept.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: accept.2,v 1.28 2014/09/09 03:50:43 guenther Exp $ +.\" $OpenBSD: accept.2,v 1.29 2019/05/26 09:47:28 krw Exp $ .\" $NetBSD: accept.2,v 1.7 1996/01/31 20:14:42 mycroft Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)accept.2 8.2 (Berkeley) 12/11/93 .\" -.Dd $Mdocdate: September 9 2014 $ +.Dd $Mdocdate: May 26 2019 $ .Dt ACCEPT 2 .Os .Sh NAME @@ -126,9 +126,14 @@ a socket for the purposes of doing an .Fn accept by selecting it for read. .Sh RETURN VALUES -The call returns \-1 on error. -If it succeeds, it returns a non-negative integer that is a descriptor -for the accepted socket. +If successful, +.Fn accept +and +.Fn accept4 +return a non-negative integer, the accepted socket file descriptor. +Otherwise, a value of \-1 is returned and +.Va errno +is set to indicate the error. .Sh EXAMPLES The following code uses struct .Li sockaddr_storage diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index 01e1f2b77ca..5fc2194e742 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: socket.2,v 1.42 2019/03/03 18:18:34 schwarze Exp $ +.\" $OpenBSD: socket.2,v 1.43 2019/05/26 09:47:28 krw Exp $ .\" $NetBSD: socket.2,v 1.5 1995/02/27 12:37:53 cgd Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: March 3 2019 $ +.Dd $Mdocdate: May 26 2019 $ .Dt SOCKET 2 .Os .Sh NAME @@ -219,8 +219,12 @@ and .Xr getsockopt 2 are used to set and get options, respectively. .Sh RETURN VALUES -A \-1 is returned if an error occurs, otherwise the return -value is a descriptor referencing the socket. +If successful, +.Fn socket +returns a non-negative integer, the socket file descriptor. +Otherwise, a value of \-1 is returned and +.Va errno +is set to indicate the error. .Sh ERRORS The .Fn socket |