summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2015-02-19 18:56:39 +0000
committered <ed@FreeBSD.org>2015-02-19 18:56:39 +0000
commit6c07c5b094bd89019872b7fd37d3f43d83041a53 (patch)
treeb62cf61712d3e6b3f276f09266b69a29c5b09ca5 /usr.sbin
parentadcfe0d35eaa52aa6916520d27b810de6f0ce9a5 (diff)
downloadFreeBSD-src-6c07c5b094bd89019872b7fd37d3f43d83041a53.zip
FreeBSD-src-6c07c5b094bd89019872b7fd37d3f43d83041a53.tar.gz
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index d7c281c..bc054b8 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -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);
OpenPOWER on IntegriCloud