mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
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
This commit is contained in:
parent
6740ed378b
commit
0f0d5f6e45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279016
@ -557,7 +557,8 @@ main(int argc, char *argv[])
|
|||||||
if (finet) {
|
if (finet) {
|
||||||
if (SecureMode) {
|
if (SecureMode) {
|
||||||
for (i = 0; i < *finet; i++) {
|
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");
|
logerror("shutdown");
|
||||||
if (!Debug)
|
if (!Debug)
|
||||||
die(0);
|
die(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user