- change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic process manager

This commit is contained in:
Jérôme Loyet 2010-11-07 19:45:51 +00:00
parent 12167194b5
commit b41d13ba98
3 changed files with 7 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -38,7 +38,8 @@ enum {
enum {
FPM_PCTL_TERM,
FPM_PCTL_STOP,
FPM_PCTL_CONT
FPM_PCTL_CONT,
FPM_PCTL_QUIT
};
#endif