From owner-man-jp-reviewer@jp.freebsd.org  Fri May 26 23:39:37 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id XAA49145;
	Fri, 26 May 2000 23:39:37 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from basil.veltec.co.jp (camomile.veltec.co.jp [211.2.223.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id XAA49140
	for <man-jp-reviewer@jp.freebsd.org>; Fri, 26 May 2000 23:39:35 +0900 (JST)
	(envelope-from yuko@veltec.co.jp)
Received: from jade ([192.168.0.66])
	by basil.veltec.co.jp (8.10.0.Beta6/3.7W03/20/00) with ESMTP
	id e4QEilt06039
	for <man-jp-reviewer@jp.freebsd.org>; Fri, 26 May 2000 23:44:47 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
X-SMIME-fingerprint: A7:AE:D4:83:9D:5B:A5:F2:24:8F:F4:DC:87:3C:72:89
From: Yuko Sasaki <yuko@veltec.co.jp>
Message-Id: <200005262340.HCH92704.VPZL@veltec.co.jp>
X-Mailer: Winbiff [Version 2.31 beta1]
Date: Fri, 26 May 2000 23:40:44 +0900
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: man-jp-reviewer 2568
Subject: [man-jp-reviewer 2568] (man2) shutdown.2
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: yuko@veltec.co.jp

------- $B$3$3$+$i(B --------------------------------------------------
.\" 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
.\"
.Dd June 4, 1993
.Dt SHUTDOWN 2
.Os BSD 4.2
.Sh $BL>>N(B
.Nm shutdown
.Nd $BA4Fs=E@\B3$N0lIt$r%7%c%C%H%@%&%s(B
.Sh $B=q<0(B
.Fd #include <sys/types.h>
.Fd #include <sys/socket.h>
.Ft int
.Fn shutdown "int s" "int how"
.Sh $B2r@b(B
.Fn shutdown
$B$r8F$S=P$9$H!"(B
.Fa s
$B$K4XO"$9$k%=%1%C%H$NA4Fs=E@\B3$NA4It$+0lIt$,%7%c%C%H%@%&%s$5$l$^$9!#(B
.Fa how
$B$,(B
.No Dv SHUT_RD Pq 0
$B$G$"$k>l9g$O!"$5$i$J$k<u?.$O$G$-$J$/$J$j$^$9!#(B
.Fa how
$B$,(B
.No Dv SHUT_WR Pq 1
$B$G$"$k>l9g$O!"$5$i$J$kAw?.$,$G$-$J$/$J$j$^$9!#(B
.Fa how
$B$,(B
.No Dv SHUT_RDWR Pq 2
$B$G$"$k>l9g$O!"$5$i$J$kAw<u?.$,$G$-$J$/$J$j$^$9!#(B
.Sh $BLa$jCM(B
$B8F$S=P$7$GLdBj$,H/@8$7$J$+$C$?>l9g$O(B 0 $B$,JV$5$l$^$9!#(B
$B%(%i!<$,H/@8$7$?>l9g$O(B -1 $B$,JV$5$l$^$9!#(B
.Sh $B%(%i!<(B
$B0J2<$N>l9g!"8F$S=P$7$O%(%i!<$K$J$j$^$9!#(B
.Bl -tag -width ENOTCONNAA
.It Bq Er EBADF
.Fa s
$B$,@5$7$$5-=R;R$K$J$C$F$$$^$;$s!#(B
.It Bq Er ENOTSOCK
.Fa s
$B$,%=%1%C%H$G$O$J$/%U%!%$%k$K$J$C$F$$$^$9!#(B
.It Bq Er ENOTCONN
$B;XDj$7$?%=%1%C%H$,@\B3$5$l$F$$$^$;$s!#(B
.El
.Sh $B4XO"9`L\(B
.Xr connect 2 ,
.Xr socket 2
.Sh $B5,3J(B
.Fn shutdown
$B4X?t$O!"40@.;~$K$O(B
.St -p1003.1g
$B$K=`5r$7$^$9!#(B
.Sh $BNr;K(B
.Fn shutdown
$B4X?t8F$S=P$7$O!"(B
.Bx 4.2
$B$KDI2C$5$l$^$7$?!#(B
.Dv SHUT_
$BDj?t$O!"(B
.St -p1003.1g
$B$KDI2C$5$l$^$7$?!#(B
------- $B$3$3$^$G(B --------------------------------------------------

------- $B86J8!&$3$3$+$i(B --------------------------------------------------
.\" 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
.\"
.Dd June 4, 1993
.Dt SHUTDOWN 2
.Os BSD 4.2
.Sh NAME
.Nm shutdown
.Nd shut down part of a full-duplex connection
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <sys/socket.h>
.Ft int
.Fn shutdown "int s" "int how"
.Sh DESCRIPTION
The
.Fn shutdown
call causes all or part of a full-duplex connection on
the socket associated with
.Fa s
to be shut down.
If
.Fa how
is 
.No Dv SHUT_RD Pq 0 ,
further receives will be disallowed.
If
.Fa how
is
.No Dv SHUT_WR Pq 1 ,
further sends will be disallowed.
If
.Fa how
is 
.No Dv SHUT_RDWR Pq 2 ,
further sends and receives will be disallowed.
.Sh RETURN VALUES
A 0 is returned if the call succeeds, -1 if it fails.
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width ENOTCONNAA
.It Bq Er EBADF
.Fa S
is not a valid descriptor.
.It Bq Er ENOTSOCK
.Fa S
is a file, not a socket.
.It Bq Er ENOTCONN
The specified socket is not connected.
.El
.Sh SEE ALSO
.Xr connect 2 ,
.Xr socket 2
.Sh STANDARDS
The
.Fn shutdown
function is expected to comply with
.St -p1003.1g ,
when finalized.
.Sh HISTORY
The
.Fn shutdown
function call appeared in
.Bx 4.2 .
The
.Dv SHUT_
constants appeared in
.St -p1003.1g .
------- $B86J8!&$3$3$^$G(B --------------------------------------------------
