From: Jérôme Loyet Date: Sun, 7 Nov 2010 19:45:51 +0000 (+0000) Subject: - change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic... X-Git-Tag: php-5.4.0alpha1~191^2~719 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b41d13ba988d787b114754b0cda52dbbebe10bed;p=php - change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic process manager --- diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index d303cfb038..417c1a2cdc 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -212,7 +212,7 @@ void fpm_children_bury(struct event_base *base) /* {{{ */ /* if it's been killed because of dynamic process management * don't restart it automaticaly */ - if (child && child->idle_kill && WTERMSIG(status) == SIGTERM) { + if (child && child->idle_kill && WTERMSIG(status) == SIGQUIT) { restart_child = 0; } diff --git a/sapi/fpm/fpm/fpm_process_ctl.c b/sapi/fpm/fpm/fpm_process_ctl.c index d4639b0863..b49767243f 100644 --- a/sapi/fpm/fpm/fpm_process_ctl.c +++ b/sapi/fpm/fpm/fpm_process_ctl.c @@ -143,6 +143,9 @@ int fpm_pctl_kill(pid_t pid, int how) /* {{{ */ case FPM_PCTL_CONT : s = SIGCONT; break; + case FPM_PCTL_QUIT : + s = SIGQUIT; + break; default : break; } @@ -358,7 +361,7 @@ static void fpm_pctl_perform_idle_server_maintenance(struct timeval *now, struct if (idle > wp->config->pm_max_spare_servers && last_idle_child) { last_idle_child->idle_kill = 1; - fpm_pctl_kill(last_idle_child->pid, FPM_PCTL_TERM); + fpm_pctl_kill(last_idle_child->pid, FPM_PCTL_QUIT); wp->idle_spawn_rate = 1; continue; } diff --git a/sapi/fpm/fpm/fpm_process_ctl.h b/sapi/fpm/fpm/fpm_process_ctl.h index 8834d5f3b8..0c8801f69b 100644 --- a/sapi/fpm/fpm/fpm_process_ctl.h +++ b/sapi/fpm/fpm/fpm_process_ctl.h @@ -38,7 +38,8 @@ enum { enum { FPM_PCTL_TERM, FPM_PCTL_STOP, - FPM_PCTL_CONT + FPM_PCTL_CONT, + FPM_PCTL_QUIT }; #endif