The current version is somewhat awkward and forgets to mention that
errno is set. I adapted the paragraph found in most other system call
man pages.

Thanks for your time,
Mike


Index: lib/libc/sys/socket.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/socket.2,v
retrieving revision 1.41
diff -u -p -u -r1.41 socket.2
--- lib/libc/sys/socket.2       19 Mar 2016 22:10:49 -0000      1.41
+++ lib/libc/sys/socket.2       22 Sep 2016 01:20:30 -0000
@@ -219,8 +219,11 @@ 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.
+Upon successful completion, a descriptor referencing the socket is
+returned. Otherwise, the value \-1 is returned and the global
+variable
+.Va errno
+is set to indicate the error.
 .Sh ERRORS
 The
 .Fn socket

Reply via email to