diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-31 12:43:43 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-31 12:43:43 +0000 |
commit | 3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 (patch) | |
tree | 6824ff50935275424156f34fd5ec7912c1f4b055 /src/sys | |
parent | 02f6bfcef4f2e8b0fdbf12c652ab202edbeed19a (diff) |
more heisenbugs fixes
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/sys.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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 <unistd.h> #include <signal.h> +#include <string.h> #include <sys/time.h> #include <sys/stat.h> #include <sys/types.h> @@ -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 |