[syslog-ng] [PATCH] lib/gprocess.c: Ignore SIGHUP inside the supervisor.

Gergely Nagy algernon at balabit.hu
Fri Apr 20 16:34:05 CEST 2012


Reloading syslog-ng's config is often done via a killall -HUP
syslog-ng command, which also sends a signal to the
supervisor. However, the supervisor did not handle said signal, thus
it exited as is the default for it.

To work around this issue, lets ignore SIGHUP inside the supervisor.

Reported-by: Patrick Hemmer
Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
 lib/gprocess.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/gprocess.c b/lib/gprocess.c
index aaefbab..9246d88 100644
--- a/lib/gprocess.c
+++ b/lib/gprocess.c
@@ -1110,7 +1110,9 @@ g_process_perform_supervise(void)
                 g_process_message("Initialization failed but the daemon did not exit, even when forced to, trying to recover; pid='%d'", pid);
               continue;
             }
-          
+
+          sigignore(SIGHUP);
+
           if (process_opts.check_fn && (process_opts.check_period >= 0))
             {
               gint i = 1;
-- 
1.7.9.1




More information about the syslog-ng mailing list