pgpool2.git / summary / log / commit / refs

commit    fa9c5f8c9e2e15c0aeab31ef5569a4d470f93990
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Fri Feb 15 09:36:55 2008 +0000

    Fix zombie process problem. "switching" flag did not clear when
    invalid node ID was detached.


main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index a4e1316d1..dec35d2c6 100644 --- a/main.c +++ b/main.c @@ -1146,6 +1146,7 @@ static void failover(void) pool_error("failover_handler: invalid node_id %d status:%d MAX_NUM_BACKENDS: %d", node_id, BACKEND_INFO(node_id).backend_status, MAX_NUM_BACKENDS); kill(pcp_pid, SIGUSR2); + switching = 0; return; } @@ -1180,6 +1181,7 @@ static void failover(void) pool_log("failover: no backends are degenerated"); pool_semaphore_unlock(REQUEST_INFO_SEM); kill(pcp_pid, SIGUSR2); + switching = 0; return; } } @@ -1211,6 +1213,7 @@ static void failover(void) pool_semaphore_unlock(REQUEST_INFO_SEM); switching = 0; kill(pcp_pid, SIGUSR2); + switching = 0; return; } [parent: f38b05cbdea0]