mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
- change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic process manager
This commit is contained in:
parent
e6bef6735f
commit
0399b83ccb
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ enum {
|
||||
enum {
|
||||
FPM_PCTL_TERM,
|
||||
FPM_PCTL_STOP,
|
||||
FPM_PCTL_CONT
|
||||
FPM_PCTL_CONT,
|
||||
FPM_PCTL_QUIT
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user