syslogd/sysklogd-1.4.1-dgram.patch

15 lines
414 B
Diff

--- syslog.c
+++ syslog.c Wed May 23 18:48:13 2001
@@ -211,8 +211,9 @@
strncpy(SyslogAddr.sa_data, _PATH_LOGNAME,
sizeof(SyslogAddr.sa_data));
if (LogStat & LOG_NDELAY) {
- LogFile = socket(AF_UNIX, SOCK_DGRAM, 0);
-/* fcntl(LogFile, F_SETFD, 1); */
+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
+ return;
+ fcntl(LogFile, F_SETFD, 1);
}
}
if (LogFile != -1 && !connected &&