Date: Tue, 18 May 2010 12:58:05 +0900 From: Yoshihiko Sarumaru <ysarumaru@gmail.com> To: Kostik Belousov <kostikbel@gmail.com>, kib@FreeBSD.org Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: odd behavior on select() after shutdown() Message-ID: <AANLkTikQHAzFix4E6clRlKl2pS16RroOQkL5VY6OyBt0@mail.gmail.com> In-Reply-To: <20100517190525.GP83316@deviant.kiev.zoral.com.ua> References: <AANLkTilQexT6ZobWYe2MuPcsD5RnTsx3SL0Zru_01Q9C@mail.gmail.com> <20100517190525.GP83316@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, 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) returns 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 urgent flag >> was observed by tcpdump. >> It seems strange for me, but is it an intentional change on 8.x ? > The patch below would fix the problem at hand. I am wondering what > unintended consequences it might have. 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? 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 comments? thanks, - yoshihiko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikQHAzFix4E6clRlKl2pS16RroOQkL5VY6OyBt0>