LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File sysklogd-1.4.1-dgram.patch of Package syslogd.363 (Project openSUSE:12.1:Update)

--- syslog.c
+++ syslog.c	2001-05-23 18:48:13.000000000 +0000
@@ -211,8 +211,9 @@ openlog(ident, logstat, logfac)
 		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 &&