Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2001 12:57:27 +0200
From:      Bernd Walter <ticso@mail.cicely.de>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Sean Chittenden <sean-freebsd-hackers@chittenden.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: What happens to a connection between a select and accept...
Message-ID:  <20010625125727.A340@cicely20.cicely.de>
In-Reply-To: <xzp1yo91476.fsf@flood.ping.uio.no>; from des@ofug.org on Mon, Jun 25, 2001 at 08:09:01AM %2B0200
References:  <20010624195910.A44590@rand.tgd.net> <xzp1yo91476.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 25, 2001 at 08:09:01AM +0200, Dag-Erling Smorgrav wrote:
> Sean Chittenden <sean-freebsd-hackers@chittenden.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010625125727.A340>