Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Mar 2015 09:15:11 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r280020 - stable/10/usr.sbin/syslogd
Message-ID:  <201503150915.t2F9FC6R029698@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503150915.t2F9FC6R029698>