aboutsummaryrefslogblamecommitdiff
path: root/ja_JP.eucJP/man/man2/shutdown.2
blob: 3e02ec91c60f8b88b51cf42b6f761632fbf614fb (plain) (tree)































                                                                              
                                                                                
   
                                                                                          
                     
              
   


                                    

              






                              
                            

                                                                    
    
       









                                      
          
                     




                                                          
          

                                      
               
    

                              





                              
                  
    
     
                              






                  
                  




                
                  


                                 
                  
                  
.\" Copyright (c) 1983, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)shutdown.2	8.1 (Berkeley) 6/4/93
.\" %FreeBSD: src/lib/libc/sys/shutdown.2,v 1.7.2.6 2001/08/17 15:42:46 ru Exp %
.\"
.\" $FreeBSD: doc/ja_JP.eucJP/man/man2/shutdown.2,v 1.7 2001/08/19 07:14:27 horikawa Exp $
.Dd February 27, 2001
.Dt SHUTDOWN 2
.Os
.Sh 名称
.Nm shutdown
.Nd 全二重接続の一部をシャットダウン
.Sh ライブラリ
.Lb libc
.Sh 書式
.Fd #include <sys/types.h>
.Fd #include <sys/socket.h>
.Ft int
.Fn shutdown "int s" "int how"
.Sh 解説
.Fn shutdown
を呼び出すと、ファイル記述子
.Fa s
に関連するソケットの全二重接続の全部か一部がシャットダウンされます。
引数
.Fa how
でシャットダウンのタイプを指定します。
可能な値は以下の通りです:
.Bl -tag -width SHUT_RDWR
.It Dv SHUT_RD
これ以降の受信ができなくなります。
.It Dv SHUT_WR
これ以降の送信ができなくなります。
.It Dv SHUT_RDWR
これ以降の送受信ができなくなります。
.El
.Sh 戻り値
.\" .Rv -std shutdown
.Fn shutdown
関数は成功すると 0 を返します。
それ以外の場合は値 -1 が返され、エラーを示すグローバル変数
.Fa error
が設定されます。
.Sh エラー
次の場合、呼び出しはエラーになります。
.Bl -tag -width Er
.It Bq Er EBADF
引数
.Fa s
が有効な記述子ではありません。
.It Bq Er EINVAL
引数
.Fa how
が有効な値ではありません。
.It Bq Er ENOTCONN
ソケットは接続されていません。
.It Bq Er ENOTSOCK
引数
.Fa s
はソケットを参照していません。
.El
.Sh 関連項目
.Xr connect 2 ,
.Xr socket 2
.Sh 規格
.Fn shutdown
関数は、完成時には
.St -p1003.1g-2000
に準拠します。
.Sh 歴史
.Fn shutdown
関数呼び出しは、
.Bx 4.2
で追加されました。
定数
.Dv SHUT_RD , SHUT_WR , SHUT_RDWR
は、
.St -p1003.1g-2000
に追加されました。