diff tests/test-jsapi-timer.c @ 1132:6f85c4743494

tests: fix broken tests because of SIGUSR1
author David Demelier <markand@malikania.fr>
date Thu, 09 Dec 2021 11:34:49 +0100
parents 99dccafade22
children 2daceccf7392
line wrap: on
line diff
--- a/tests/test-jsapi-timer.c	Thu Dec 09 11:27:36 2021 +0100
+++ b/tests/test-jsapi-timer.c	Thu Dec 09 11:34:49 2021 +0100
@@ -17,6 +17,7 @@
  */
 
 #include <poll.h>
+#include <signal.h>
 
 #define GREATEST_USE_ABBREVS 0
 #include <greatest.h>
@@ -111,6 +112,13 @@
 int
 main(int argc, char **argv)
 {
+	struct sigaction sa;
+
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sa.sa_handler = SIG_IGN;
+	sigaction(SIGUSR1, &sa, NULL);
+
 	irc_bot_init();
 
 	GREATEST_MAIN_BEGIN();