Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
committerStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
commit3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 (patch)
tree6824ff50935275424156f34fd5ec7912c1f4b055 /src/sys
parent02f6bfcef4f2e8b0fdbf12c652ab202edbeed19a (diff)
more heisenbugs fixes
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/sys.cc5
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