107 lines
3.3 KiB
Groff
107 lines
3.3 KiB
Groff
.\" 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.5 2001/03/13 18:00:09 ru 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
|
|
¤ËÄɲ䵤ì¤Þ¤·¤¿¡£
|