Module: check_mk
Branch: master
Commit: 018f73892928f035bafd9769439385c7df6c1ce5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=018f73892928f0…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Nov 24 15:31:13 2015 +0100
We should better iniialize more of struct sigaction. Thanks, valgrind! :-)
---
agents/waitmax | Bin 11604 -> 11604 bytes
agents/waitmax.c | 2 ++
2 files changed, 2 insertions(+)
diff --git a/agents/waitmax b/agents/waitmax
index 96950c9..9e2097b 100755
Binary files a/agents/waitmax and b/agents/waitmax differ
diff --git a/agents/waitmax.c b/agents/waitmax.c
index fa5abd0..12cbd19 100644
--- a/agents/waitmax.c
+++ b/agents/waitmax.c
@@ -199,6 +199,8 @@ int main(int argc, char **argv)
if (g_pid == 0) {
/* Restore tty behavior in the child. */
struct sigaction sa;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESTART; /* just to be sure... */
sa.sa_handler = SIG_DFL;
sigaction(SIGTTIN, &sa, NULL);
sigaction(SIGTTOU, &sa, NULL);