You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2011/05/17 00:34:00 UTC
svn commit: r1103932 - /httpd/httpd/trunk/server/mpm_unix.c
Author: trawick
Date: Mon May 16 22:33:59 2011
New Revision: 1103932
URL: http://svn.apache.org/viewvc?rev=1103932&view=rev
Log:
When shutting down with worker or event with active processes
which had lost their scoreboard slot during a prior graceful
restart, calls to ap_unregister_extra_mpm_process() were hidden
if AP_DEBUG (maintainer mode) wasn't defined.
This resulted in an uninitialized generation variable being
passed through to the child_status hook.
Modified:
httpd/httpd/trunk/server/mpm_unix.c
Modified: httpd/httpd/trunk/server/mpm_unix.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_unix.c?rev=1103932&r1=1103931&r2=1103932&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_unix.c (original)
+++ httpd/httpd/trunk/server/mpm_unix.c Mon May 16 22:33:59 2011
@@ -247,8 +247,12 @@ void ap_reclaim_child_processes(int term
extra_process_t *next = cur_extra->next;
if (reclaim_one_pid(cur_extra->pid, action_table[cur_action].action)) {
- AP_DEBUG_ASSERT(1 == ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen));
- mpm_callback(-1, cur_extra->pid, old_gen);
+ if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
+ mpm_callback(-1, cur_extra->pid, old_gen);
+ }
+ else {
+ AP_DEBUG_ASSERT(1 == 0);
+ }
}
else {
++not_dead_yet;
@@ -291,8 +295,12 @@ void ap_relieve_child_processes(ap_recla
extra_process_t *next = cur_extra->next;
if (reclaim_one_pid(cur_extra->pid, DO_NOTHING)) {
- AP_DEBUG_ASSERT(1 == ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen));
- mpm_callback(-1, cur_extra->pid, old_gen);
+ if (ap_unregister_extra_mpm_process(cur_extra->pid, &old_gen) == 1) {
+ mpm_callback(-1, cur_extra->pid, old_gen);
+ }
+ else {
+ AP_DEBUG_ASSERT(1 == 0);
+ }
}
cur_extra = next;
}