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:37 +0200 |
commit | 186adefd5651103308080aa1d53f01b982582446 (patch) | |
tree | 8f7a1184cbd02f6a7ad8d101788b86702927aa1d | |
parent | 4fe4c4b34dd96d36bfd5579ce64fd4fe73814175 (diff) | |
download | redis-186adefd5651103308080aa1d53f01b982582446.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 3fb491cb7..c7e058305 100644 --- a/src/debug.c +++ b/src/debug.c @@ -947,7 +947,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); } |