diff options
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -55,7 +55,7 @@ { \ if (failover_request) \ { \ - failover(failover_request); \ + failover(failover_signo); \ failover_request = 0; \ } \ if (sigchld_request) \ @@ -111,6 +111,7 @@ static int health_check_timer_expired; /* non 0 if health check timer expired * static volatile sig_atomic_t failover_request = 0; static volatile sig_atomic_t sigchld_request = 0; static int pipe_fds[2]; /* for delivering signals */ +static volatile int failover_signo = 0; int myargc; char **myargv; @@ -804,6 +805,7 @@ static RETSIGTYPE failover_handler(int sig) { POOL_SETMASK(&BlockSig); failover_request = 1; + failover_signo = sig; write(pipe_fds[1], "\0", 1); POOL_SETMASK(&UnBlockSig); } |
