Skip to content

Commit 53dbba7

Browse files
authored
Windows: reactive sigint handler after each Ctrl-C (#736)
1 parent 437e778 commit 53dbba7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/main/main.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ int main(int argc, char ** argv) {
368368
// potentially set color to indicate we are taking user input
369369
set_console_color(con_st, CONSOLE_COLOR_USER_INPUT);
370370

371+
#if defined (_WIN32)
372+
// Windows: must reactivate sigint handler after each signal
373+
signal(SIGINT, sigint_handler);
374+
#endif
375+
371376
if (params.instruct) {
372377
printf("\n> ");
373378
}

0 commit comments

Comments
 (0)