From b31838624119708b3d265dd34d6bc6cda25944c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Fri, 14 Jun 2013 00:40:48 -0400 Subject: systemd: use service type notify There is a time window, between rsyslog reporting syntax errors and the daemon returning with failure, this may cause systemctl restart rsyslog to not report any error inmediately but later in the logs which is confusing to users. The appropiate steps to correct this annoyance is to notify systemd with a simple sd_notify(0, "READY=1"); just before entering the main loop. Tested in openSUSE 12.3/13.1 x86_64 --- tools/syslogd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/syslogd.c') diff --git a/tools/syslogd.c b/tools/syslogd.c index 7a8e21c2..a8a733d6 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -2033,6 +2033,8 @@ int realMain(int argc, char **argv) ourConf->globals.bErrMsgToStderr = 0; } + sd_notify(0, "READY=1"); + mainloop(); /* do any de-init's that need to be done AFTER this comment */ -- cgit v1.2.3