aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/0008_nxcomp_sa-restorer.full+lite.patch
blob: f1447ccb0a11dcc6554b1727de6cecf5bfb9e4d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: sa_restorer vs. memset
 Use memset instead of setting sa_restorer to NULL.
Forwarded: pending
Author: Alexander Morozov
Last-Update: 2012-02-07
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -5884,20 +5884,9 @@
 
   struct sigaction newAction;
 
-  newAction.sa_handler = HandleSignal;
-
-  //
-  // This field doesn't exist on most OSes except
-  // Linux. We keep setting the field to NULL to
-  // avoid side-effects in the case the field is
-  // a value return.
-  //
+  memset(&newAction, 0, sizeof(newAction));
 
-  #if defined(__linux__)
-
-  newAction.sa_restorer = NULL;
-
-  #endif
+  newAction.sa_handler = HandleSignal;
 
   sigemptyset(&(newAction.sa_mask));
 
@@ -6509,13 +6498,9 @@
 
   struct sigaction action;
 
-  action.sa_handler = HandleTimer;
-
-  #if defined(__linux__)
+  memset(&action, 0, sizeof(action));
 
-  action.sa_restorer = NULL;
-
-  #endif
+  action.sa_handler = HandleTimer;
 
   sigemptyset(&action.sa_mask);