From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 14:38:19 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5BF316A416; Tue, 12 Dec 2006 14:38:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF0C343DA8; Tue, 12 Dec 2006 14:24:05 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1Gu8ZE-000GNm-Uw; Tue, 12 Dec 2006 16:25:21 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBCEOuFg003721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Dec 2006 16:24:57 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBCEOutV020035; Tue, 12 Dec 2006 16:24:56 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBCEOsKu020034; Tue, 12 Dec 2006 16:24:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 12 Dec 2006 16:24:54 +0200 From: Kostik Belousov To: Daniel Eischen Message-ID: <20061212142454.GL311@deviant.kiev.zoral.com.ua> References: <20061211171115.GD311@deviant.kiev.zoral.com.ua> <200612120816.07608.davidxu@freebsd.org> <20061212135647.GK311@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0FRtVia6Q6lt+M0P" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL, UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua X-Scanner-Signature: b22dd54e5e410b0526d530b08df0ebb5 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 594 [Dec 12 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-arch@freebsd.org, "Arne H. Juul" , David Xu , freebsd-java@freebsd.org Subject: Re: close() of active socket does not work on FreeBSD 6 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2006 14:38:19 -0000 --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--