static int warn_stop = 0;
static int connected = 0;
+static int allow_ctl_c = 0;
static char prompt_str[512] = "";
static cli_profile_t profiles[128] = {{{0}}};
static cli_profile_t internal_profile = {{ 0 }};
static void handle_SIGINT(int sig)
{
- if (!connected) {
+ if (!connected || allow_ctl_c) {
fprintf(stdout, "Interrupted.\n");
exit(1);
}
int temp_log = -1;
int argv_error = 0;
int argv_exec = 0;
- int ctl_c = 0;
char argv_command[1024] = "";
char argv_loglevel[128] = "";
int argv_quiet = 0;
argv_quiet = 1;
break;
case 'i':
- ctl_c = 1;
+ allow_ctl_c = 1;
break;
case 'r':
loops += 120;
esl_log(ESL_LOG_INFO, "Retrying\n");
}
} else {
- if (!ctl_c) {
- connected = 1;
- }
+ connected = 1;
if (temp_log < 0 ) {
esl_global_set_default_logger(profile->debug);
} else {