diff options
author | Nicolas Trangez <ikke@nicolast.be> | 2014-04-23 20:06:15 +0200 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-04-27 04:21:01 -0500 |
commit | f2595fd9d03803874df792072292d792a2c03bce (patch) | |
tree | 5b669cb741f70959332c66a90587ce2597ca9a7a /rts | |
parent | 6d11a0e1400e44e16e0ee7734279c67619442a1d (diff) | |
download | haskell-f2595fd9d03803874df792072292d792a2c03bce.tar.gz |
Check return value of sigaction
Issue discovered by Coverity scan, CID 43142.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts')
-rw-r--r-- | rts/posix/Signals.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 01d5347ae7..f4a8341c6a 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"); + } } /* ----------------------------------------------------------------------------- |