From owner-freebsd-hackers Mon Jun 25 3:56:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 2A85737B406 for ; Mon, 25 Jun 2001 03:56:41 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f5PAuc624202; Mon, 25 Jun 2001 12:56:38 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f5PAvS300348; Mon, 25 Jun 2001 12:57:28 +0200 (CEST) Date: Mon, 25 Jun 2001 12:57:27 +0200 From: Bernd Walter To: Dag-Erling Smorgrav Cc: Sean Chittenden , freebsd-hackers@FreeBSD.ORG Subject: Re: What happens to a connection between a select and accept... Message-ID: <20010625125727.A340@cicely20.cicely.de> References: <20010624195910.A44590@rand.tgd.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Mon, Jun 25, 2001 at 08:09:01AM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jun 25, 2001 at 08:09:01AM +0200, Dag-Erling Smorgrav wrote: > Sean Chittenden writes: > > Quick question. Anyone know how gracefully the kernel handles a > > socket connection that is killed by the client between a select and > > accept call? I don't expect any problems, but I know there was a race > > condition in Linux that caused all kinds of nasty bugs and problems. > > There was one in FreeBSD too. It's been fixed; accept(2) will return > -1 and set errno to ECONNABORTED, which you'd know if you'd RTFM. And even if it is not a problem with FreeBSD the portable way is to set the listen socket to non-blocking so accept will always return. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message