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:33 +0200 |
commit | 7a0c5fdf12d9cd035e41734f518aa4568dc48c9d (patch) | |
tree | 377b98d0546f1ae0e208ca75a3292a5c97b465f4 | |
parent | 88c23075355e22471cb9b35cafd3ba65f8870dba (diff) | |
download | redis-7a0c5fdf12d9cd035e41734f518aa4568dc48c9d.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); } |