diff options
author | Matt Stancliff <matt@genges.com> | 2014-05-22 15:34:02 -0400 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-26 17:53:40 +0200 |
commit | 75266018eebe1633b4b083afaece793d2b005766 (patch) | |
tree | ef79151b3b48ede32812b6ab821f7f33cc35af1f | |
parent | edc41baca5a38848cf121c5966ff6590e8b24f0a (diff) | |
download | redis-75266018eebe1633b4b083afaece793d2b005766.tar.gz |
Disable recursive watchdog signal handler
If we are in the signal handler, we don't want to handle
the signal again. In extreme cases, this can cause a stack overflow
and segfault Redis.
Fixes #1771
-rw-r--r-- | src/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index b6735749b..c47b4f20c 100644 --- a/src/debug.c +++ b/src/debug.c @@ -931,7 +931,7 @@ void enableWatchdog(int period) { /* Watchdog was actually disabled, so we have to setup the signal * handler. */ sigemptyset(&act.sa_mask); - act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; + act.sa_flags = SA_ONSTACK | SA_SIGINFO; act.sa_sigaction = watchdogSignalHandler; sigaction(SIGALRM, &act, NULL); } |