diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2013-06-14 00:40:48 -0400 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-14 07:49:11 +0200 |
commit | b31838624119708b3d265dd34d6bc6cda25944c8 (patch) | |
tree | 329b6b657dc0fa0706aee39a251cc689cd581473 /tools | |
parent | d7da379009f7cabbfa0e9577fbdbff5d846dfd95 (diff) | |
download | rsyslog-b31838624119708b3d265dd34d6bc6cda25944c8.tar.gz rsyslog-b31838624119708b3d265dd34d6bc6cda25944c8.tar.bz2 rsyslog-b31838624119708b3d265dd34d6bc6cda25944c8.zip |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |