OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man2 / shutdown.2
1 .\" Copyright (c) 1983, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\" %%%LICENSE_END
33 .\"
34 .\"     $Id: shutdown.2,v 1.1.1.1 1999/03/21 22:52:23 freitag Exp $
35 .\"
36 .\" Modified Sat Jul 24 09:57:55 1993 by Rik Faith <faith@cs.unc.edu>
37 .\" Modified Tue Oct 22 22:04:51 1996 by Eric S. Raymond <esr@thyrsus.com>
38 .\" Modified 1998 by Andi Kleen
39 .\"
40 .\"*******************************************************************
41 .\"
42 .\" This file was generated with po4a. Translate the source file.
43 .\"
44 .\"*******************************************************************
45 .TH SHUTDOWN 2 2012\-09\-06 Linux "Linux Programmer's Manual"
46 .SH 名前
47 shutdown \- 全二重接続の一部を閉じる
48 .SH 書式
49 \fB#include <sys/socket.h>\fP
50 .sp
51 \fBint shutdown(int \fP\fIsockfd\fP\fB, int \fP\fIhow\fP\fB);\fP
52 .SH 説明
53 \fBshutdown\fP()  は、 \fIsockfd\fP に関連づけられているソケットによる全二重接続 (full\-duplex connection)
54 の一部または全てを閉じる。 \fIhow\fP が \fBSHUT_RD\fP ならば、それ以降の受信を禁止する。 \fIhow\fP が \fBSHUT_WR\fP
55 ならば、それ以降の送信を禁止する。 \fIhow\fP が \fBSHUT_RDWR\fP ならば、それ以降の送受信を禁止する。
56 .SH 返り値
57 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
58 .SH エラー
59 .TP 
60 \fBEBADF\fP
61 \fIsockfd\fP が有効なディスクリプターでない。
62 .TP 
63 \fBEINVAL\fP
64 An invalid value was specified in \fIhow\fP (but see BUGS).
65 .TP 
66 \fBENOTCONN\fP
67 指定されたソケットは接続されていない。
68 .TP 
69 \fBENOTSOCK\fP
70 \fIsockfd\fP がソケットでなくファイルである。
71 .SH 準拠
72 POSIX.1\-2001, 4.4BSD (\fBshutdown\fP()  関数コールは 4.2BSD で初めて登場した)。
73 .SH 注意
74 \fBSHUT_RD\fP, \fBSHUT_WR\fP, \fBSHUT_RDWR\fP の各定数 (それぞれ 0, 1, 2 の値を持つ) は
75 glibc\-2.1.91 以降、 \fI<sys/socket.h>\fP で定義されている。
76 .SH バグ
77 .\" FIXME
78 .\" https://bugzilla.kernel.org/show_bug.cgi?id=47111
79 As currently implemented, checks for the validity of \fIhow\fP are done in
80 domain\-specific code, and not all domains perform these checks.  Most
81 notably, UNIX domain sockets simply ignore invalid values; this may change
82 in the future.
83 .SH 関連項目
84 \fBconnect\fP(2), \fBsocket\fP(2), \fBsocket\fP(7)
85 .SH この文書について
86 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
87 である。プロジェクトの説明とバグ報告に関する情報は
88 http://www.kernel.org/doc/man\-pages/ に書かれている。