]> granicus.if.org Git - php/commitdiff
- change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic...
authorJérôme Loyet <fat@php.net>
Sun, 7 Nov 2010 19:45:51 +0000 (19:45 +0000)
committerJérôme Loyet <fat@php.net>
Sun, 7 Nov 2010 19:45:51 +0000 (19:45 +0000)
sapi/fpm/fpm/fpm_children.c
sapi/fpm/fpm/fpm_process_ctl.c
sapi/fpm/fpm/fpm_process_ctl.h

index d303cfb038a4c4115c8630f34b6158c9d365efb6..417c1a2cdce92d8be8f48492ed04f5708b2d29fc 100644 (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;
                        }
 
index d4639b0863678aac427f451cdcc85d6a38fc9162..b49767243f851d2d5fa3a856d359970bd8dcd4ff 100644 (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;
                }
index 8834d5f3b82425f7ea418f1bbe32afc0a1d205bf..0c8801f69bdfbe1b0e005d416ebd4083f5411145 100644 (file)
@@ -38,7 +38,8 @@ enum {
 enum {
        FPM_PCTL_TERM,
        FPM_PCTL_STOP,
-       FPM_PCTL_CONT
+       FPM_PCTL_CONT,
+       FPM_PCTL_QUIT
 };
 
 #endif