From owner-freebsd-net Fri Feb 9 13:24:37 2001 Delivered-To: freebsd-net@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id CCCDF37B491 for ; Fri, 9 Feb 2001 13:24:13 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f19LODE19284 for net@freebsd.org; Fri, 9 Feb 2001 13:24:13 -0800 (PST) Date: Fri, 9 Feb 2001 13:24:13 -0800 From: Alfred Perlstein To: net@freebsd.org Subject: shutdown(2) patch for 2.2.x Message-ID: <20010209132413.N26076@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'd like to see this in 2.2.x, any objections? Index: sys/sys/socket.h =================================================================== RCS file: /home/ncvs/src/sys/sys/socket.h,v retrieving revision 1.15.2.1 diff -u -u -r1.15.2.1 socket.h --- sys/sys/socket.h 1999/09/05 08:22:55 1.15.2.1 +++ sys/sys/socket.h 2001/02/06 21:04:05 @@ -325,6 +325,13 @@ int msg_accrightslen; }; +/* + * howto arguments for shutdown(2), specified by Posix.1g. + */ +#define SHUT_RD 0 /* shut down the reading side */ +#define SHUT_WR 1 /* shut down the writing side */ +#define SHUT_RDWR 2 /* shut down both sides */ + #ifndef KERNEL #include Index: lib/libc/sys/shutdown.2 =================================================================== RCS file: /home/ncvs/src/lib/libc/sys/shutdown.2,v retrieving revision 1.2.2.1 diff -u -u -r1.2.2.1 shutdown.2 --- lib/libc/sys/shutdown.2 1997/01/12 00:09:34 1.2.2.1 +++ lib/libc/sys/shutdown.2 2001/02/06 20:49:10 @@ -50,13 +50,13 @@ to be shut down. If .Fa how -is 0, further receives will be disallowed. +is SHUT_RD (0), further receives will be disallowed. If .Fa how -is 1, further sends will be disallowed. +is SHUT_WR (1), further sends will be disallowed. If .Fa how -is 2, further sends and receives will be disallowed. +is SHUT_RDWR (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 -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message