Date: Sat, 8 Aug 2015 15:05:39 -0400 From: Alexander Kabaev <kabaev@gmail.com> To: Ed Schouten <ed@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285910 - in head: lib/libc/sys sys/kern sys/sys Message-ID: <20150808150539.0b43cfcd@kan> In-Reply-To: <201507271317.t6RDHwpj067194@repo.freebsd.org> References: <201507271317.t6RDHwpj067194@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/BbKdeIG_rtzy/3KPa5m0ARF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 27 Jul 2015 13:17:58 +0000 (UTC) Ed Schouten <ed@FreeBSD.org> wrote: > Author: ed > Date: Mon Jul 27 13:17:57 2015 > New Revision: 285910 > URL: https://svnweb.freebsd.org/changeset/base/285910 >=20 > Log: > Make shutdown() return ENOTCONN as required by POSIX, part deux. > =20 > Summary: > Back in 2005, maxim@ attempted to fix shutdown() to return ENOTCONN > in case the socket was not connected (r150152). This had to be rolled > back (r150155), as it broke some of the existing programs that depend > on this behavior. I reapplied this change on my system and indeed, > syslogd failed to start up. I fixed this back in February (279016) > and MFC'ed it to the supported stable branches. Apart from that, > things seem to work out all right. Since at least Linux and Mac OS X > do the right thing, I'd like to go ahead and give this another try. > To keep old copies of syslogd working, only start returning ENOTCONN > for recent binaries. I took a look at the XNU sources and they seem > to test against both SS_ISCONNECTED, SS_ISCONNECTING and > SS_ISDISCONNECTING, instead of just SS_ISCONNECTED. That seams > reasonable, so let's do the same. Test Plan: This issue was uncovered > while writing tests for shutdown() in CloudABI: > https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/sys/socket/shutd= own_test.c#L26 > Reviewers: glebius, rwatson, #manpages, gnn, #network Reviewed By: > gnn, #network Subscribers: bms, mjg, imp=20 > Differential Revision: https://reviews.freebsd.org/D3039 >=20 Hi Ed, this commit broke more than just syslogd. rtsol and rtsold both are victims of the change as they are trying to shutdown unconnected raw sockets to make then 'send-only' and fail. --=20 Alexander Kabaev --Sig_/BbKdeIG_rtzy/3KPa5m0ARF Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVxlMEXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+uZ0P/1PY2Qg259PwCr8IU/ASxOhf LqGSGAkjdXMIua65wCjpuFFLAmdxeRpew/ES1bCKUc/VFyGMSzwo9gAPk8LJD7+1 l+CK1s6ouvf4fSXa7YPTyfDDotu+LeS1yoH401GL58lDe1Iyr6xZkmEb8wNAriS/ EH0bhw5bpG9sVXHCq403BBbRN9jQrQ8YKU2duuMPa15pxSlFugN1gXxl3O7r3MIW 12InxhmFPX8B+lzKx2xbemzh0rBJtgV1bv+cVh7DenqPHyPN28SY4jhsxRUdiEZy 6+4C2lO48jgb6NOfAtWnMQgW/20J2T71mh3L6ZIh3BQ8LMQtOzLsd+nAZ/mqe3/t X0PYhepDdmehKGVXgjuwVnkWtoILF9KmVBzkkd/A26aVpfFY/lVh+K4FsVz8lCtN VJNGehrD+5s1AnZ8nYMk3weq7wDihqfTYXELdZxy/RKgNwVRysg7H3nU89iLtSOh YvpC0ThTUm8Bu4WhStRcn/P0FfxqOrrvvl+Vtv3UMQJIvU1NmeSPW5G5H3lUWkHm NDwmV5cijwgfyEzeVJ9COYmxLiL0lbZxYHdyr5j+Z7PzB82qkINL92GD5KPux3RB MzTDqUL/ET9inlfJ/Pj3vynRmsG+cF3J70L4/TRVUmnw4QOiCM5EYrm2X6hAjlU1 v8ZQsLpIswPNWrFZAiqm =NIzU -----END PGP SIGNATURE----- --Sig_/BbKdeIG_rtzy/3KPa5m0ARF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150808150539.0b43cfcd>