Date: Tue, 18 May 2010 11:40:32 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Yoshihiko Sarumaru <ysarumaru@gmail.com> Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: odd behavior on select() after shutdown() Message-ID: <20100518084032.GU83316@deviant.kiev.zoral.com.ua> In-Reply-To: <AANLkTikQHAzFix4E6clRlKl2pS16RroOQkL5VY6OyBt0@mail.gmail.com> References: <AANLkTilQexT6ZobWYe2MuPcsD5RnTsx3SL0Zru_01Q9C@mail.gmail.com> <20100517190525.GP83316@deviant.kiev.zoral.com.ua> <AANLkTikQHAzFix4E6clRlKl2pS16RroOQkL5VY6OyBt0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--3T4dLCyS4EPlIT+v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2010 at 12:58:05PM +0900, Yoshihiko Sarumaru wrote: > Hi, >=20 > 2010/5/18 Kostik Belousov <kostikbel@gmail.com>: > > On Tue, May 18, 2010 at 01:08:50AM +0900, Yoshihiko Sarumaru wrote: > >> Hi all, > >> > >> Select(2) has three arguments to get socket status for read, write and= except. > >> After upgrading to 8.0-RELEASE, select() after shutdown(SHUT_WR) retur= ns with > >> the status exceptfds is set. It means out-of-bound data can be read > >> from the socket, > >> but recv() with OOB flag returns ECONNRESET, and no packets with urgen= t flag > >> was observed by tcpdump. > >> It seems strange for me, but is it an intentional change on 8.x ? >=20 > > The patch below would fix the problem at hand. I am wondering what > > unintended consequences it might have. >=20 > It works perfect for me on 8.0-RELEASE, thanks! > I can't see how much this change has side effects, > but is it commitable to current or stable? >=20 > Kib, it seems you had changed some code using POLLHUP in uipc_socket.c. > I'm not sure it is related to this issue, but could you give us your comm= ents? Sometimes being kib, I have no further comments, except that I think that the behaviour you reported is consequence of Jeff and my changes. I intend to commit the patch tomorrow if nobody speaks up. We will see how it goes. --3T4dLCyS4EPlIT+v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkvyUn8ACgkQC3+MBN1Mb4hpdgCg1W1GI7dPleoulAhLjKjun7ik odAAn0AtxJPvZrAPfEhVtQ6rAGGvtYBb =hloN -----END PGP SIGNATURE----- --3T4dLCyS4EPlIT+v--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100518084032.GU83316>