int old_main_node, int new_main_node, int old_primary);
static int find_primary_node(void);
static int find_primary_node_repeatedly(void);
-static void terminate_all_children(int sig);
+static void terminate_all_childrens(int sig);
static void system_will_go_down(int code, Datum arg);
static char *process_name_from_pid(pid_t pid);
static void sync_backend_from_watchdog(void);
}
/*
- * Send the kill signal to all Pgpool children except to the pgpool_logger
- * child and wait for the termination of all killed children before returning.
+ * sends the kill signal to all Pgpool children except to
+ * the pgpool_logger child
+ * wait for the termination of all killed children before returning.
*/
static void
-terminate_all_children(int sig)
+terminate_all_childrens(int sig)
{
pid_t wpid;
int i;
{
int ret_pid;
- wpid = waitpid(-1, &ret_pid, WNOHANG);
+ wpid = waitpid(-1, &ret_pid, 0);
if (wpid > 0)
terminated_count++;
} while (terminated_count < killed_count &&
ereport(LOG,
(errmsg("terminating all child processes")));
- terminate_all_children(sig);
+ terminate_all_childrens(sig);
/*
* Send signal to follow child process and it's children.
{
ereport(LOG,
(errmsg("shutting down")));
- terminate_all_children(SIGINT);
+ terminate_all_childrens(SIGINT);
}
/*