소스 검색

suppress early syslog return when log socket cannot be opened

this behavior is no longer valid in general, and was never necessary.
if the LOG_PERROR option is set, output to stderr could still succeed.
also, when the LOG_CONS option is added, it will need syslog to
proceed even if opening the log socket fails.
Rich Felker 10 년 전
부모
커밋
a64a045d1d
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      src/misc/syslog.c

+ 1 - 4
src/misc/syslog.c

@@ -82,10 +82,7 @@ static void _vsyslog(int priority, const char *message, va_list ap)
 	int l, l2;
 	int hlen;
 
-	if (log_fd < 0) {
-		__openlog();
-		if (log_fd < 0) return;
-	}
+	if (log_fd < 0) __openlog();
 
 	if (!(priority & LOG_FACMASK)) priority |= log_facility;