Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
a0b2fd83
Commit
a0b2fd83
authored
Feb 09, 2015
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sa_restorer vs. memset (008_nxcomp_sa-restorer.full+lite.patch).
Use memset instead of setting sa_restorer to NULL. Original-Author: Alexander Morozov
parent
a720908a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
66 deletions
+4
-66
008_nxcomp_sa-restorer.full+lite.patch
debian/patches/008_nxcomp_sa-restorer.full+lite.patch
+0
-46
series
debian/patches/series
+0
-1
Loop.cpp
nxcomp/Loop.cpp
+4
-19
No files found.
debian/patches/008_nxcomp_sa-restorer.full+lite.patch
deleted
100644 → 0
View file @
a720908a
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);
debian/patches/series
View file @
a0b2fd83
008_nxcomp_sa-restorer.full+lite.patch
009_nxproxy_add-man-page.full+lite.patch
009_nxagent_add-man-page.full.patch
010_nxauth_fix-binary-name-in-man-page.full.patch
...
...
nxcomp/Loop.cpp
View file @
a0b2fd83
...
...
@@ -5884,20 +5884,9 @@ void InstallSignal(int signal, int action)
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 @@ void SetTimer(int value)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment