fat                                      Sun, 07 Nov 2010 19:41:28 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=305173

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

Changed paths:
    U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_children.c
    U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
    U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.h

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_children.c
===================================================================
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_children.c    2010-11-07 
19:39:26 UTC (rev 305172)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_children.c    2010-11-07 
19:41:28 UTC (rev 305173)
@@ -212,7 +212,7 @@
                        /* 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;
                        }


Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
===================================================================
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c 2010-11-07 
19:39:26 UTC (rev 305172)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c 2010-11-07 
19:41:28 UTC (rev 305173)
@@ -143,6 +143,9 @@
                case FPM_PCTL_CONT :
                        s = SIGCONT;
                        break;
+               case FPM_PCTL_QUIT :
+                       s = SIGQUIT;
+                       break;
                default :
                        break;
        }
@@ -358,7 +361,7 @@

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

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.h
===================================================================
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.h 2010-11-07 
19:39:26 UTC (rev 305172)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.h 2010-11-07 
19:41:28 UTC (rev 305173)
@@ -38,7 +38,8 @@
 enum {
        FPM_PCTL_TERM,
        FPM_PCTL_STOP,
-       FPM_PCTL_CONT
+       FPM_PCTL_CONT,
+       FPM_PCTL_QUIT
 };

 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to