Try to fix SIGIO problem with Sun machines, h_errno with
[unix-history] / usr / src / lib / libc / sys / shutdown.2
CommitLineData
6078a027
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
d8542350 5.\" @(#)shutdown.2 6.1 (Berkeley) %G%
6078a027 6.\"
d8542350 7.TH SHUTDOWN 2 ""
6078a027
KM
8.UC 5
9.SH NAME
10shutdown \- shut down part of a full-duplex connection
11.SH SYNOPSIS
12.nf
13.ft B
14shutdown(s, how)
15int s, how;
16.fi
17.SH DESCRIPTION
18The
19.I shutdown
20call causes all or part of a full-duplex connection on
21the socket associated with
22.I s
23to be shut down.
24If \fIhow\fP is 0, then further receives will be disallowed.
25If \fIhow\fP is 1, then further sends will be disallowed.
26If \fIhow\fP is 2, then further sends and receives will be disallowed.
27.SH DIAGNOSTICS
28A 0 is returned if the call succeeds, \-1 if it fails.
29.SH ERRORS
30The call succeeds unless:
31.TP 15
32[EBADF]
33.I S
34is not a valid descriptor.
35.TP 15
36[ENOTSOCK]
37.I S
38is a file, not a socket.
39.TP 15
40[ENOTCONN]
41The specified socket is not connected.
42.SH "SEE ALSO"
43connect(2), socket(2)