X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..593a1d5fd87cdf5b46dd5fcb84467b432cea0f91:/bsd/man/man2/shutdown.2 diff --git a/bsd/man/man2/shutdown.2 b/bsd/man/man2/shutdown.2 index 927e3bdf3..4ac610045 100644 --- a/bsd/man/man2/shutdown.2 +++ b/bsd/man/man2/shutdown.2 @@ -42,36 +42,53 @@ .Sh SYNOPSIS .Fd #include .Ft int -.Fn shutdown "int s" "int how" +.Fo shutdown +.Fa "int socket" +.Fa "int how" +.Fc .Sh DESCRIPTION The .Fn shutdown call causes all or part of a full-duplex connection on the socket associated with -.Fa s +.Fa socket to be shut down. If .Fa how -is 0, further receives will be disallowed. +is +.Dv SHUT_RD , +further receives will be disallowed. If .Fa how -is 1, further sends will be disallowed. +is +.Dv SHUT_WR , +further sends will be disallowed. If .Fa how -is 2, further sends and receives will be disallowed. -.Sh DIAGNOSTICS -A 0 is returned if the call succeeds, -1 if it fails. +is +.Dv SHUT_RDWR , +further sends and receives will be disallowed. +.Sh RETURN VALUES +.Rv -std shutdown .Sh ERRORS The call succeeds unless: .Bl -tag -width Er +.\" =========== .It Bq Er EBADF -.Fa S +.Fa Socket is not a valid descriptor. -.It Bq Er ENOTSOCK -.Fa S -is a file, not a socket. +.\" =========== +.It Bq Er EINVAL +The +.Fa how +argument is invalid. +.\" =========== .It Bq Er ENOTCONN The specified socket is not connected. +.\" =========== +.It Bq Er ENOTSOCK +.Fa Socket +is a file, not a socket. .El .Sh SEE ALSO .Xr connect 2 ,