Forced kill of UE and ENB by typing ctrl

+c multiple times
This commit is contained in:
Ismael Gomez 2017-12-19 18:15:10 +01:00
parent 754a657285
commit 23718aebad
2 changed files with 12 additions and 0 deletions

View File

@ -318,12 +318,18 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
}
}
static int sigcnt = 0;
static bool running = true;
static bool do_metrics = false;
void sig_int_handler(int signo)
{
sigcnt++;
running = false;
printf("Stopping srsENB... Press Ctrl+C %d more times to force stop\n", 10-sigcnt);
if (sigcnt >= 10) {
exit(-1);
}
}
void *input_loop(void *m)

View File

@ -380,12 +380,18 @@ void parse_args(all_args_t *args, int argc, char *argv[]) {
}
}
static int sigcnt = 0;
static bool running = true;
static bool do_metrics = false;
metrics_stdout metrics_screen;
void sig_int_handler(int signo) {
sigcnt++;
running = false;
printf("Stopping srsUE... Press Ctrl+C %d more times to force stop\n", 10-sigcnt);
if (sigcnt >= 10) {
exit(-1);
}
}
void *input_loop(void *m) {