Commit | Line | Data |
---|---|---|
88b3ccf2 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
6078a027 | 3 | .\" |
88b3ccf2 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)shutdown.2 6.2 (Berkeley) %G% | |
6078a027 | 17 | .\" |
d8542350 | 18 | .TH SHUTDOWN 2 "" |
6078a027 KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | shutdown \- shut down part of a full-duplex connection | |
22 | .SH SYNOPSIS | |
23 | .nf | |
24 | .ft B | |
25 | shutdown(s, how) | |
26 | int s, how; | |
27 | .fi | |
28 | .SH DESCRIPTION | |
29 | The | |
30 | .I shutdown | |
31 | call causes all or part of a full-duplex connection on | |
32 | the socket associated with | |
33 | .I s | |
34 | to be shut down. | |
35 | If \fIhow\fP is 0, then further receives will be disallowed. | |
36 | If \fIhow\fP is 1, then further sends will be disallowed. | |
37 | If \fIhow\fP is 2, then further sends and receives will be disallowed. | |
38 | .SH DIAGNOSTICS | |
39 | A 0 is returned if the call succeeds, \-1 if it fails. | |
40 | .SH ERRORS | |
41 | The call succeeds unless: | |
42 | .TP 15 | |
43 | [EBADF] | |
44 | .I S | |
45 | is not a valid descriptor. | |
46 | .TP 15 | |
47 | [ENOTSOCK] | |
48 | .I S | |
49 | is a file, not a socket. | |
50 | .TP 15 | |
51 | [ENOTCONN] | |
52 | The specified socket is not connected. | |
53 | .SH "SEE ALSO" | |
54 | connect(2), socket(2) |