From d8552d70114cccce28aeffe5010eaf750a2277c5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 31 Aug 2017 20:25:52 +0200 Subject: 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 --- stp/stp_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3