Date: Sat, 12 May 2018 01:55:58 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 227259] accept()/poll() and shutdown()/close() - not work as in FreeBSD10, may broke many apps Message-ID: <bug-227259-7501-HxYjKQJ2PQ@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-227259-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-227259-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227259 --- Comment #17 from commit-hook@freebsd.org --- A commit references this bug: Author: jtl Date: Sat May 12 01:55:24 UTC 2018 New revision: 333511 URL: https://svnweb.freebsd.org/changeset/base/333511 Log: r285910 attempted to make shutdown() be POSIX compliant by returning ENOTCONN when shutdown() is called on unconnected sockets. This change w= as slightly modified by r316874, which returns ENOTCONN in the case of an unconnected datagram socket, but still runs the shutdown code for the socket. This specifically supports the case where the user-space code is using the shutdown() call to wakeup another thread blocked on the socket. In PR 227259, a user is reporting that they have code which is using shutdown() to wakup another thread blocked on a stream listen socket. Th= is code is failing, while it used to work on FreeBSD 10 and still works on Linux. It seems reasonable to add another exception to support something users a= re actually doing, which used to work on FreeBSD 10, and still works on Linu= x. And, it seems like it should be acceptable to POSIX, as we still return ENOTCONN. This is a direct commit to stable/11. The listen socket code changed substantially in head, and the code change there will be substantially more complex. In the meantime, it seems to make sense to commit this trivial fix to stable/11 given the fact that users appear to depend on this behavior, this appears to have been an unintended change in stable/1= 1, and we did not announce the change. PR: 227259 Reviewed by: ed Approved by: re (gjb) Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D15021 Tested by: Eric Masson (emss at free.fr) Changes: stable/11/sys/kern/uipc_socket.c --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227259-7501-HxYjKQJ2PQ>