Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2006 16:24:54 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-arch@freebsd.org, "Arne H. Juul" <arnej@pvv.ntnu.no>, David Xu <davidxu@freebsd.org>, freebsd-java@freebsd.org
Subject:   Re: close() of active socket does not work on FreeBSD 6
Message-ID:  <20061212142454.GL311@deviant.kiev.zoral.com.ua>
In-Reply-To: <Pine.GSO.4.64.0612120906590.6826@sea.ntplx.net>
References:  <Pine.LNX.4.62.0612111535280.32258@decibel.pvv.ntnu.no> <20061211171115.GD311@deviant.kiev.zoral.com.ua> <Pine.LNX.4.62.0612112259050.12159@decibel.pvv.ntnu.no> <200612120816.07608.davidxu@freebsd.org> <Pine.LNX.4.62.0612120142010.30236@decibel.pvv.ntnu.no> <Pine.GSO.4.64.0612111956110.2938@sea.ntplx.net> <Pine.GSO.4.64.0612120814460.6529@sea.ntplx.net> <20061212135647.GK311@deviant.kiev.zoral.com.ua> <Pine.GSO.4.64.0612120906590.6826@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--0FRtVia6Q6lt+M0P
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 12, 2006 at 09:08:30AM -0500, Daniel Eischen wrote:
> On Tue, 12 Dec 2006, Kostik Belousov wrote:
>=20
> >On Tue, Dec 12, 2006 at 08:18:32AM -0500, Daniel Eischen wrote:
> >>It's also couldn't be entirely solved by fixing it in the
> >>threads library.  You could still have a non-threaded
> >>application that waits on a read operation, but receives
> >>a signal and closes the socket in the signal handler.
> >
> >This is not the problem. The read (as syscall being executed) is aborted
> >when signal is delivered. Original poster considered situation where
> >read() is active (in particular, f_count of struct file is incremented
> >by fget, that caused the reported behaviour).
>=20
> Even when SA_RESTART is set?

Yes. Since SA_RESTART causes syscall to be reissued, read()
would fail with EBADFD on its own.

--0FRtVia6Q6lt+M0P
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFfru1C3+MBN1Mb4gRAmT9AJ0bq2u672FpTLNZylM4pQ21mGT4uACg6x5N
e6Kn5izt2nTwOeKXkeC4iwQ=
=h6zM
-----END PGP SIGNATURE-----

--0FRtVia6Q6lt+M0P--



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