Date: Thu, 19 Feb 2015 18:56:40 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279016 - head/usr.sbin/syslogd Message-ID: <201502191856.t1JIue20030716@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Thu Feb 19 18:56:39 2015 New Revision: 279016 URL: https://svnweb.freebsd.org/changeset/base/279016 Log: Make syslogd work in case shutdown() is POSIX-ly correct. On POSIX conformant systems, shutdown() should return ENOTCONN when not connected. We attempted to fix this once (kern/84761), but this change got backed out because it 'breaks code' (r150155). I just reapplied the patch and indeed, syslogd fails on startup. Make it easier to re-enable this change in the future by paching up syslogd to do the right thing. MFC after: 3 weeks Sponsored by: Nuxi Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Thu Feb 19 17:47:42 2015 (r279015) +++ head/usr.sbin/syslogd/syslogd.c Thu Feb 19 18:56:39 2015 (r279016) @@ -557,7 +557,8 @@ main(int argc, char *argv[]) if (finet) { if (SecureMode) { for (i = 0; i < *finet; i++) { - if (shutdown(finet[i+1], SHUT_RD) < 0) { + if (shutdown(finet[i+1], SHUT_RD) < 0 && + errno != ENOTCONN) { logerror("shutdown"); if (!Debug) die(0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502191856.t1JIue20030716>