svn commit: r280020 - stable/10/usr.sbin/syslogd

Ed Schouten ed at FreeBSD.org
Sun Mar 15 09:15:12 UTC 2015


Author: ed
Date: Sun Mar 15 09:15:11 2015
New Revision: 280020
URL: https://svnweb.freebsd.org/changeset/base/280020

Log:
  MFC r279016:
  
    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.
  
  Sponsored by: Nuxi

Modified:
  stable/10/usr.sbin/syslogd/syslogd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/syslogd/syslogd.c
==============================================================================
--- stable/10/usr.sbin/syslogd/syslogd.c	Sun Mar 15 09:06:59 2015	(r280019)
+++ stable/10/usr.sbin/syslogd/syslogd.c	Sun Mar 15 09:15:11 2015	(r280020)
@@ -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);


More information about the svn-src-stable mailing list