[commit: ghc] master: Check return value of sigaction (f2595fd)
git at git.haskell.org
git at git.haskell.org
Sun Apr 27 11:45:40 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f2595fd9d03803874df792072292d792a2c03bce/ghc
>---------------------------------------------------------------
commit f2595fd9d03803874df792072292d792a2c03bce
Author: Nicolas Trangez <ikke at nicolast.be>
Date: Wed Apr 23 20:06:15 2014 +0200
Check return value of sigaction
Issue discovered by Coverity scan, CID 43142.
Signed-off-by: Austin Seipp <austin at well-typed.com>
>---------------------------------------------------------------
f2595fd9d03803874df792072292d792a2c03bce
rts/posix/Signals.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c
index 01d5347..f4a8341 100644
--- a/rts/posix/Signals.c
+++ b/rts/posix/Signals.c
@@ -574,7 +574,9 @@ set_sigtstp_action (rtsBool handle)
}
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask);
- sigaction(SIGTSTP, &sa, NULL);
+ if (sigaction(SIGTSTP, &sa, NULL) != 0) {
+ sysErrorBelch("warning: failed to install SIGTSTP handler");
+ }
}
/* -----------------------------------------------------------------------------
More information about the ghc-commits
mailing list