From owner-freebsd-stable@FreeBSD.ORG Sun Oct 18 12:15:57 2009 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7841B106566C for ; Sun, 18 Oct 2009 12:15:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 03AD08FC1E for ; Sun, 18 Oct 2009 12:15:56 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n9ICFkwl050712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Oct 2009 15:15:46 +0300 (EEST) (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.14.3/8.14.3) with ESMTP id n9ICFkrx024034; Sun, 18 Oct 2009 15:15:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n9ICFjaM024033; Sun, 18 Oct 2009 15:15:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Oct 2009 15:15:45 +0300 From: Kostik Belousov To: "Mikhail T." Message-ID: <20091018121545.GO2160@deviant.kiev.zoral.com.ua> References: <4AD9F4ED.2050002@aldan.algebra.com> <20091017172718.GJ2160@deviant.kiev.zoral.com.ua> <4ADA04B3.1000704@aldan.algebra.com> <20091017175941.GK2160@deviant.kiev.zoral.com.ua> <4ADA3F7E.1070208@aldan.algebra.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EEx6GiKZGZ1wKUra" Content-Disposition: inline In-Reply-To: <4ADA3F7E.1070208@aldan.algebra.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: stable@freebsd.org Subject: Re: Can close-ing a pipe trigger a SIGPIPE? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2009 12:15:57 -0000 --EEx6GiKZGZ1wKUra Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 17, 2009 at 06:04:46PM -0400, Mikhail T. wrote: > Kostik Belousov =CE=C1=D0=C9=D3=C1=D7(=CC=C1): > >> This 0-size write must be part of the pipe-closing -- descriptors 4 and > >> 5 must be the pipe's: > >> > >> 92722 tclsh8.5 CALL write(0x4,0x800e24028,0) > >> 92722 tclsh8.5 RET write -1 errno 32 Broken pipe > >> 92722 tclsh8.5 PSIG SIGPIPE caught handler=3D0x800f126d0 mask=3D0x0 = code=3D0x0 > >> 92722 tclsh8.5 CALL sigreturn(0x7fffffffa0c0) > >> 92722 tclsh8.5 RET sigreturn JUSTRETURN > >> 92722 tclsh8.5 CALL close(0x5) > >> 92722 tclsh8.5 RET close 0 > >> 92722 tclsh8.5 CALL close(0x4) > >> 92722 tclsh8.5 RET close 0 > >> > >> Why would it write 0 bytes? Is doing so triggering a SIGPIPE now -- bu= t, > >> perhaps, didn't use to? > >> =20 > > > > Obviously, I cannot answer the question. This is something that should > > be read from source code or asked by authors. Source code of the application, this is probably unclear from the above sentence. > > =20 > You -- or someone else -- could comment like: >=20 > a) Yeah, the meaning of write-ing 0 bytes changed in version such and > such to conform to such and such standard. >=20 > or >=20 > b) No, nothing changed in that area of FreeBSD for years -- there must > be something in Tcl itself. It cannot be stated in this way, since application started to issue zero-length writes. Why it started doing this, either some buggy ABI change in the base system, or buggy application noted and reacted inconsitently to the ABI addition etc cannot be even theoretized. This is why I made that formulation noting the reason should be read from the app source code. --EEx6GiKZGZ1wKUra Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkrbBvEACgkQC3+MBN1Mb4ii2wCdEt7T35eJW1T8StctaZx95gQF vzYAoJxV7D3ncvFMnV+EqbxK1NP1aGD0 =kbjM -----END PGP SIGNATURE----- --EEx6GiKZGZ1wKUra--