add signal handlers for Windows SIGBREAK
[fio.git] / t / io_uring.c
index f22c504afc6ad3dbab725dcb1395ba725d7bb196..e5568aa2e5a8f8420e714bfb0752c04feb762497 100644 (file)
@@ -684,6 +684,11 @@ static void arm_sig_int(void)
        act.sa_handler = sig_int;
        act.sa_flags = SA_RESTART;
        sigaction(SIGINT, &act, NULL);
+
+       /* Windows uses SIGBREAK as a quit signal from other applications */
+#ifdef WIN32
+       sigaction(SIGBREAK, &act, NULL);
+#endif
 }
 
 static int setup_ring(struct submitter *s)