blob: 6dc373bf6b619c0f3ebf008a05192847020107f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From algernon@balabit.hu Fri Apr 20 10:34:44 2012
Date: Fri, 20 Apr 2012 16:34:05 +0200
From: Gergely Nagy <algernon@balabit.hu>
Reply-To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu>
To: syslog-ng@lists.balabit.hu
Subject: [syslog-ng] [PATCH] lib/gprocess.c: Ignore SIGHUP inside the supervisor.
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@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
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq
|