aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 12:06:33 +0100
committerHarald Welte <laforge@gnumonks.org>2016-01-16 17:47:40 +0100
commitd93bd21185efeaccb215cb4e81a81186b039a8f5 (patch)
tree0a69e395bcd3bd753a5da3a64f05b07ab591ea8c /src/osmo-bts-sysmo/main.c
parent8250800d3bcef5c8e67b822d8e83ddf3233ca3e4 (diff)
sysmoBTS: port 'press Ctrl+C twice for immediate exit' from osmo-bts-trx
Diffstat (limited to 'src/osmo-bts-sysmo/main.c')
-rw-r--r--src/osmo-bts-sysmo/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 9984e3cf..72cd0ee6 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -61,6 +61,7 @@
int pcu_direct = 0;
+static int quit = 0;
static const char *config_file = "osmo-bts.cfg";
static int daemonize = 0;
static unsigned int dsp_trace = 0x00000000;
@@ -268,7 +269,9 @@ static void signal_handler(int signal)
switch (signal) {
case SIGINT:
//osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
- bts_shutdown(bts, "SIGINT");
+ if (!quit)
+ bts_shutdown(bts, "SIGINT");
+ quit++;
break;
case SIGABRT:
case SIGUSR1:
@@ -415,7 +418,7 @@ int main(int argc, char **argv)
}
}
- while (1) {
+ while (quit < 2) {
log_reset_context();
osmo_select_main(0);
}