summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-31 20:25:52 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-31 20:25:52 +0200
commitd8552d70114cccce28aeffe5010eaf750a2277c5 (patch)
tree9cf408ba034203b798c2fc4951d0ddaec1c99b98
parent02e029708a62cdac960947193c8f850c3fe5ad66 (diff)
osmo-stp: Fix process termination on SIGINT+SIGTERM
In commit eed8c1bfae1d151e135b574d83ed295d36ad8b44 we introduced some singal handling code for (among others) SIGINT and SIGTERM. This code causes the process to hang rather than terminate, as it only dispatches a signal that nobody handles yet in libosmo-sccp. Until a proper implementation is made, let's terminate the process as expected. Change-Id: Iff79c8ac0b347660333912c9258073a013ea799b
-rw-r--r--stp/stp_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stp/stp_main.c b/stp/stp_main.c
index 8e3282c..a33045a 100644
--- a/stp/stp_main.c
+++ b/stp/stp_main.c
@@ -134,8 +134,11 @@ static void signal_handler(int signal)
switch (signal) {
case SIGINT:
case SIGTERM:
+ /* FIXME: handle the signal somewhere else and gracefully shut down
+ * SIGTRAN links
osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL);
- sleep(1);
+ sleep(1); */
+ exit(0);
break;
case SIGABRT:
osmo_generate_backtrace();