From 3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 31 Jul 2008 12:43:43 +0000 Subject: more heisenbugs fixes --- src/sys/sys.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sys') diff --git a/src/sys/sys.cc b/src/sys/sys.cc index 10b7897..da9b08d 100644 --- a/src/sys/sys.cc +++ b/src/sys/sys.cc @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -46,8 +47,10 @@ void signal(int signum, signalfunc handler) #ifndef _WIN32 struct sigaction sa; - sa.sa_handler = handler; + sa.sa_sigaction = 0; + memset(&sa.sa_mask, 0 ,sizeof(sigset_t)); sa.sa_flags = 0; + sa.sa_handler = handler; ::sigaction(signum, &sa, 0); #endif -- cgit v1.2.3