diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-02-27 13:48:07 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-02-27 13:48:07 +0000 |
| commit | 8ac6dca7959d78631abbc365b8d2d245f30a88da (patch) | |
| tree | e7b05a16f95e718f0996d91c23992d32342b49d0 /lib/libc | |
| parent | 4c0440cb8652801c1c3750a474f7ddbb17897cdf (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/sys/shutdown.2 | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/lib/libc/sys/shutdown.2 b/lib/libc/sys/shutdown.2 index 5739340c2c4b..700b52d4bdce 100644 --- a/lib/libc/sys/shutdown.2 +++ b/lib/libc/sys/shutdown.2 @@ -32,9 +32,9 @@ .\" @(#)shutdown.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd February 27, 2001 .Dt SHUTDOWN 2 -.Os BSD 4.2 +.Os .Sh NAME .Nm shutdown .Nd shut down part of a full-duplex connection @@ -49,37 +49,42 @@ The .Fn shutdown call causes all or part of a full-duplex connection on -the socket associated with +the socket associated with the file descriptor .Fa s to be shut down. -If +The .Fa how -is -.No Dv SHUT_RD Pq 0 , +argument specifies the type of shutdown. +Possible values are: +.Bl -tag -width SHUT_RDWR +.It Dv SHUT_RD further receives will be disallowed. -If -.Fa how -is -.No Dv SHUT_WR Pq 1 , +.It Dv SHUT_WR further sends will be disallowed. -If -.Fa how -is -.No Dv SHUT_RDWR Pq 2 , +.It Dv SHUT_RDWR further sends and receives will be disallowed. +.El .Sh RETURN VALUES -A 0 is returned if the call succeeds, -1 if it fails. +.Rv -std shutdown . .Sh ERRORS -The call succeeds unless: +The +.Fn shutdown +call fails if: .Bl -tag -width Er .It Bq Er EBADF -.Fa S -is not a valid descriptor. -.It Bq Er ENOTSOCK -.Fa S -is a file, not a socket. +The +.Fa s +argument is not a valid file descriptor. +.It Bq Er EINVAL +The +.Fa how +argument is invalid. .It Bq Er ENOTCONN -The specified socket is not connected. +The socket is not connected. +.It Bq Er ENOTSOCK +The +.Fa s +argument does not refer to a socket. .El .Sh SEE ALSO .Xr connect 2 , @@ -96,6 +101,8 @@ The function call appeared in .Bx 4.2 . The -.Dv SHUT_ +.Dv SHUT_RD , SHUT_WR , +and +.Dv SHUT_RDWR constants appeared in .St -p1003.1g . |
