summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-18 19:06:13 +0100
committerHarald Welte <laforge@gnumonks.org>2013-03-18 19:06:13 +0100
commit8e878738d16ad4f8776dc0130ebff78dea422ee7 (patch)
tree99381d1815b7f74b4e7ee092eb5a78bcd9b381bd /src
parent4de854dcf00124b82c12421c3ea1f06a9edeff76 (diff)
application: don't ignore SIGHUP but do config file reopen.
Diffstat (limited to 'src')
-rw-r--r--src/application.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/application.c b/src/application.c
index e0d989e5..881f0117 100644
--- a/src/application.c
+++ b/src/application.c
@@ -72,13 +72,18 @@
struct log_target *osmo_stderr_target;
+static void sighup_hdlr(int signal)
+{
+ log_targets_reopen();
+}
+
/*! \brief Ignore \ref SIGPIPE, \ref SIGALRM, \ref SIGHUP and \ref SIGIO */
void osmo_init_ignore_signals(void)
{
/* Signals that by default would terminate */
signal(SIGPIPE, SIG_IGN);
signal(SIGALRM, SIG_IGN);
- signal(SIGHUP, SIG_IGN);
+ signal(SIGHUP, &sighup_hdlr);
signal(SIGIO, SIG_IGN);
}