summaryrefslogtreecommitdiffstats
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index b5f8f464..05554a64 100644
--- a/signal.c
+++ b/signal.c
@@ -37,6 +37,9 @@
#if HAVE_SYS_TIME
#include <sys/time.h>
#endif
+#if HAVE_VALGRIND
+#include <valgrind/memcheck.h>
+#endif
#include "lib.h"
#include "gc.h"
#include "signal.h"
@@ -366,6 +369,9 @@ int sig_mask(int how, const sigset_t *set, sigset_t *oldset)
if (memcmp(&sig_blocked_cache, pnew, sizeof *pnew) != 0) {
sig_blocked_cache = *pnew;
+#if HAVE_VALGRIND
+ VALGRIND_MAKE_MEM_DEFINED(oldset, sizeof *oldset);
+#endif
return sigprocmask(SIG_SETMASK, &sig_blocked_cache, oldset);
}