[systemd-commits] Makefile.am src/kmsg-syslogd.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Mar 7 13:01:38 PST 2011


 Makefile.am        |    2 ++
 src/kmsg-syslogd.c |    3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b670e92b50686773c82ccb4c07f93e85ff90783b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 7 21:56:09 2011 +0100

    syslog: make sure the kmsg bridge is always pulled in and never terminated automatically
    
    Since we want to replace the bridge dynamically by the real syslog
    implementation such as rsyslog we need to make sure that the the bridge
    stays running right to the moment rsyslog is up so that we process
    messages enqueued by other processes started before rsyslog, so that
    those clients don't stay stuck.

diff --git a/Makefile.am b/Makefile.am
index 7bbdb24..8d34dab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1292,6 +1292,7 @@ install-data-hook:
 			systemd-tmpfiles-setup.service \
 			systemd-sysctl.service \
 			systemd-ask-password-console.path \
+			systemd-kmsg-syslogd.service \
 			cryptsetup.target && \
 		$(LN_S) ../dev-hugepages.automount dev-hugepages.automount && \
 		$(LN_S) ../dev-mqueue.automount dev-mqueue.automount && \
@@ -1304,6 +1305,7 @@ install-data-hook:
 		$(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
 		$(LN_S) ../systemd-sysctl.service systemd-sysctl.service && \
 		$(LN_S) ../systemd-ask-password-console.path systemd-ask-password-console.path && \
+		$(LN_S) ../systemd-kmsg-syslogd.service && \
 		$(LN_S) ../cryptsetup.target cryptsetup.target )
 	( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
 		rm -f systemd-tmpfiles-clean.timer && \
diff --git a/src/kmsg-syslogd.c b/src/kmsg-syslogd.c
index e23c9d3..4edb161 100644
--- a/src/kmsg-syslogd.c
+++ b/src/kmsg-syslogd.c
@@ -39,7 +39,6 @@
 #include "fdset.h"
 
 #define SERVER_FD_MAX 16
-#define TIMEOUT ((int) (5*60*MSEC_PER_SEC))
 
 typedef struct Stream Stream;
 
@@ -512,7 +511,7 @@ int main(int argc, char *argv[]) {
                 struct epoll_event event;
                 int k;
 
-                if ((k = epoll_wait(server.epoll_fd, &event, 1, TIMEOUT)) < 0) {
+                if ((k = epoll_wait(server.epoll_fd, &event, 1, -1)) < 0) {
 
                         if (errno == EINTR)
                                 continue;



More information about the systemd-commits mailing list