pgpool2.git / summary / log / commit / refs

commit    6b86c284432cb19fb1a3e9cc725b5af7301eec07
Author:   at.mitani <at.mitani@gmail.com>
Date:     Wed Jun 13 01:20:10 2012 +0000

    modified start/stop watchdog process in main.c


main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 524379b84..6d2239e24 100644 --- a/main.c +++ b/main.c @@ -179,6 +179,7 @@ int my_proc_id; static BackendStatusRecord backend_rec; /* Backend status record */ static pid_t worker_pid; /* pid of worker process */ +static pid_t watchdog_pid; /* pid of watchdog process */ BACKEND_STATUS* my_backend_status[MAX_NUM_BACKENDS]; /* Backend status buffer */ int my_master_node_id; /* Master node id buffer */ @@ -417,12 +418,12 @@ int main(int argc, char **argv) exit(1); } + /* start watchdog */ + watchdog_pid = wd_main(1); + /* set signal masks */ poolinitmask(); - /* start watchdog */ - wd_main(1); - if (not_detach) write_pid_file(); else @@ -1559,6 +1560,7 @@ static RETSIGTYPE exit_handler(int sig) kill(pcp_pid, sig); kill(worker_pid, sig); + kill(watchdog_pid, sig); POOL_SETMASK(&UnBlockSig); [parent: 23bbc2c50317]