From: Brandon Paupore Date: Tue, 28 Sep 2021 17:12:15 +0000 (-0500) Subject: add signal handlers for Windows SIGBREAK X-Git-Tag: fio-3.29~88^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=2cf71009ebae454a2dad2fac6cba20fa6f09f520;p=fio.git add signal handlers for Windows SIGBREAK Signed-off-by: Brandon Paupore --- diff --git a/server.c b/server.c index 859a401b..90c52e01 100644 --- a/server.c +++ b/server.c @@ -2457,6 +2457,11 @@ static void set_sig_handlers(void) }; sigaction(SIGINT, &act, NULL); + + /* Windows uses SIGBREAK as a quit signal from other applications */ +#ifdef WIN32 + sigaction(SIGBREAK, &act, NULL); +#endif } void fio_server_destroy_sk_key(void) diff --git a/t/io_uring.c b/t/io_uring.c index f22c504a..e5568aa2 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -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)