Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
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