File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ static void write_logfile(
98
98
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
99
99
static void sigint_handler (int signo) {
100
100
if (signo == SIGINT) {
101
- if (!is_interacting) {
101
+ if (!is_interacting && g_params-> interactive ) {
102
102
is_interacting = true ;
103
103
} else {
104
104
console::cleanup ();
@@ -392,7 +392,8 @@ int main(int argc, char ** argv) {
392
392
LOG_TEE (" \n " );
393
393
}
394
394
395
- if (params.interactive ) {
395
+ // ctrl+C handling
396
+ {
396
397
#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
397
398
struct sigaction sigint_action;
398
399
sigint_action.sa_handler = sigint_handler;
@@ -405,7 +406,9 @@ int main(int argc, char ** argv) {
405
406
};
406
407
SetConsoleCtrlHandler (reinterpret_cast <PHANDLER_ROUTINE>(console_ctrl_handler), true );
407
408
#endif
409
+ }
408
410
411
+ if (params.interactive ) {
409
412
LOG_TEE (" %s: interactive mode on.\n " , __func__);
410
413
411
414
if (!params.antiprompt .empty ()) {
You can’t perform that action at this time.
0 commit comments