freebsd-skq/lib
Ed Schouten b114aa7959 Make shutdown() return ENOTCONN as required by POSIX, part deux.
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/shutdown_test.c#L26

Reviewers: glebius, rwatson, #manpages, gnn, #network

Reviewed By: gnn, #network

Subscribers: bms, mjg, imp

Differential Revision: https://reviews.freebsd.org/D3039
2015-07-27 13:17:57 +00:00
..
atf Add META_MODE support. 2015-06-13 19:20:56 +00:00
clang new depends 2015-06-16 23:37:19 +00:00
csu Force the dynamic linker to resolve _end early so we pick up the correct 2015-07-02 15:02:59 +00:00
libalias Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libarchive Drop libarchive.pc 2015-07-19 21:31:52 +00:00
libauditd Add META_MODE support. 2015-06-13 19:20:56 +00:00
libbegemot new depends 2015-06-16 23:37:19 +00:00
libblocksruntime Add META_MODE support. 2015-06-13 19:20:56 +00:00
libbluetooth Add META_MODE support. 2015-06-13 19:20:56 +00:00
libbsdstat libbsdstat: fix warnings, set WARNS 2014-03-11 01:10:44 +00:00
libbsm Add META_MODE support. 2015-06-13 19:20:56 +00:00
libbsnmp Add META_MODE support. 2015-06-13 19:20:56 +00:00
libbz2 Add META_MODE support. 2015-06-13 19:20:56 +00:00
libc Make shutdown() return ENOTCONN as required by POSIX, part deux. 2015-07-27 13:17:57 +00:00
libc_nonshared Add META_MODE support. 2015-06-13 19:20:56 +00:00
libc++ Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcalendar Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcam Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libcapsicum Let the nv.h and dnv.h includes be only in sys directory. 2015-07-02 21:58:10 +00:00
libcasper Let the nv.h and dnv.h includes be only in sys directory. 2015-07-02 21:58:10 +00:00
libclang_rt Upgrade our copy of clang and llvm to 3.6.1 release. 2015-05-25 13:43:03 +00:00
libcom_err new depends 2015-06-16 23:37:19 +00:00
libcompat Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcompiler_rt Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcrypt new depends 2015-06-16 23:37:19 +00:00
libcuse Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcxxrt Add __cxa_deleted_virtual to libcxxrt's version map. 2015-06-23 17:54:24 +00:00
libdevctl Add a new device control utility for new-bus devices called devctl. This 2015-02-06 16:09:01 +00:00
libdevinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
libdevstat Add META_MODE support. 2015-06-13 19:20:56 +00:00
libdpv Add META_MODE support. 2015-06-13 19:20:56 +00:00
libdwarf new depends 2015-06-16 23:37:19 +00:00
libedit Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libefi use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libelf Add META_MODE support. 2015-06-13 19:20:56 +00:00
libelftc Pay attention to MK_ELFTOOLCHAIN_TOOLS so we build the desired tools. 2015-06-15 20:11:15 +00:00
libevent Add META_MODE support. 2015-06-13 19:20:56 +00:00
libexecinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
libexpat Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libfetch Remove unused variable to silence clang warning. 2015-07-04 17:22:07 +00:00
libfigpar Add META_MODE support. 2015-06-13 19:20:56 +00:00
libgeom Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libgpib Add META_MODE support. 2015-06-13 19:20:56 +00:00
libgpio Bump .Dd for the example code update. 2015-07-01 16:50:01 +00:00
libgssapi Add META_MODE support. 2015-06-13 19:20:56 +00:00
libiconv_modules Bump GCC max-inline-insns-single in libiconv_modules and grep 2015-07-26 00:11:04 +00:00
libipsec New AES modes for IPSec, user space components. 2015-07-03 20:09:14 +00:00
libjail Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libkiconv Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libkvm The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
libldns new depends 2015-06-16 23:37:19 +00:00
liblzma only enable immintrin when clang is used. The base gcc does not support it. 2015-07-08 18:36:37 +00:00
libmagic new depends 2015-06-16 23:37:19 +00:00
libmd Add new include path for sha256.h 2015-07-12 03:39:36 +00:00
libmemstat Add META_MODE support. 2015-06-13 19:20:56 +00:00
libmilter Add META_MODE support. 2015-06-13 19:20:56 +00:00
libmp new depends 2015-06-16 23:37:19 +00:00
libmt Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libnandfs
libnetbsd Add META_MODE support. 2015-06-13 19:20:56 +00:00
libnetgraph Add META_MODE support. 2015-06-13 19:20:56 +00:00
libngatm Add META_MODE support. 2015-06-13 19:20:56 +00:00
libnv Move the nvlist source and private includes from sys/kern to seperate 2015-07-04 16:33:37 +00:00
libohash Add META_MODE support. 2015-06-13 19:20:56 +00:00
libopie new depends 2015-06-16 23:37:19 +00:00
libpam new depends 2015-06-16 23:37:19 +00:00
libpcap Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libpjdlog Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libpmc Add META_MODE support. 2015-06-13 19:20:56 +00:00
libproc Make libproc compilable on AArch64. 2015-07-01 13:59:26 +00:00
libprocstat Add META_MODE support. 2015-06-13 19:20:56 +00:00
libradius new depends 2015-06-16 23:37:19 +00:00
librpcsec_gss Add META_MODE support. 2015-06-13 19:20:56 +00:00
librpcsvc Add META_MODE support. 2015-06-13 19:20:56 +00:00
librt Add META_MODE support. 2015-06-13 19:20:56 +00:00
librtld_db Add META_MODE support. 2015-06-13 19:20:56 +00:00
libsbuf new depends 2015-06-16 23:37:19 +00:00
libsdp Add META_MODE support. 2015-06-13 19:20:56 +00:00
libsm libsm/path.c is about to disappear in the merge of sendmail 8.15.2. It is an 2015-07-07 02:35:06 +00:00
libsmb Add META_MODE support. 2015-06-13 19:20:56 +00:00
libsmdb Add META_MODE support. 2015-06-13 19:20:56 +00:00
libsmutil Add META_MODE support. 2015-06-13 19:20:56 +00:00
libsqlite3 Add META_MODE support. 2015-06-13 19:20:56 +00:00
libstand Add META_MODE support. 2015-06-13 19:20:56 +00:00
libstdbuf Add META_MODE support. 2015-06-13 19:20:56 +00:00
libstdthreads Add META_MODE support. 2015-06-13 19:20:56 +00:00
libtacplus Add META_MODE support. 2015-06-13 19:20:56 +00:00
libtelnet Add META_MODE support. 2015-06-13 19:20:56 +00:00
libthr cosmetic: whitespaces-tab before EOL 2015-07-08 16:35:24 +00:00
libthread_db new depends 2015-06-16 23:37:19 +00:00
libucl Add META_MODE support. 2015-06-13 19:20:56 +00:00
libufs Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libugidfw Set some internal helpers as static and initialize few variables to silence 2015-06-24 01:48:44 +00:00
libulog Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
libunbound Add META_MODE support. 2015-06-13 19:20:56 +00:00
libusb libusb: Fix minor cast-qual warning. 2015-07-20 16:15:56 +00:00
libusbhid Add META_MODE support. 2015-06-13 19:20:56 +00:00
libutil Bump .Dd due to changes made in r285050 and r285053 2015-07-02 19:41:08 +00:00
libvgl Add META_MODE support. 2015-06-13 19:20:56 +00:00
libvmmapi Move the 'devmem' device nodes from /dev/vmm to /dev/vmm.io 2015-07-06 19:41:43 +00:00
libwrap Add META_MODE support. 2015-06-13 19:20:56 +00:00
libxo Revert r284417 it is not necessary anymore 2015-06-15 19:28:07 +00:00
liby Add META_MODE support. 2015-06-13 19:20:56 +00:00
libypclnt new depends 2015-06-16 23:37:19 +00:00
libz new depends 2015-06-16 23:37:19 +00:00
msun .ie is not supposed to be used in manpages 2015-07-14 15:21:00 +00:00
ncurses Install ncurses html documentation again after r284345 2015-06-22 05:41:13 +00:00
tests Install category Kyuafiles from their category directories. 2013-11-08 14:29:06 +00:00
Makefile First cut of DTrace for AArch64. 2015-07-01 15:51:11 +00:00
Makefile.inc