Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Oct 2009 15:15:45 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        "Mikhail T." <mi+thun@aldan.algebra.com>
Cc:        stable@freebsd.org
Subject:   Re: Can close-ing a pipe trigger a SIGPIPE?
Message-ID:  <20091018121545.GO2160@deviant.kiev.zoral.com.ua>
In-Reply-To: <4ADA3F7E.1070208@aldan.algebra.com>
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>

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

--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--



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