summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-06-07 15:52:11 -0400
committerAdam Jackson <ajax@redhat.com>2016-06-08 11:36:31 -0400
commit6178b1c91cfc9e860914acc6f0be2f2d2e07a124 (patch)
treeea2fdadb27b3103f21f5d58ab4014a61953ed7a0 /os
parent8174daa6bd3f0c792425a5ebef63a6a9ce7d00a4 (diff)
dix: Use OsSignal() not signal()
As the man page for the latter states: The effects of signal() in a multithreaded process are unspecified. We already have an interface to call sigaction() instead, use it. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os')
-rw-r--r--os/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/utils.c b/os/utils.c
index 086fe4fcd..5871ef8de 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1395,7 +1395,7 @@ System(const char *command)
if (!command)
return 1;
- csig = signal(SIGCHLD, SIG_DFL);
+ csig = OsSignal(SIGCHLD, SIG_DFL);
if (csig == SIG_ERR) {
perror("signal");
return -1;
@@ -1420,7 +1420,7 @@ System(const char *command)
}
- if (signal(SIGCHLD, csig) == SIG_ERR) {
+ if (OsSignal(SIGCHLD, csig) == SIG_ERR) {
perror("signal");
return -1;
}