From: Yoshiyuki Asaba Date: Fri, 10 Aug 2007 03:57:44 +0000 (+0000) Subject: Fix failover. X-Git-Tag: V3_4_1~5 X-Git-Url: http://git.postgresql.org/gitweb/edit?a=commitdiff_plain;h=51159f7067be3ffc96027fc56e7c5f9aab6de118;p=pgpool1.git Fix failover. When kind mismatch occured, pgpool detached master node. --- diff --git a/main.c b/main.c index d87a4a8..37b30bc 100644 --- a/main.c +++ b/main.c @@ -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); }