--- httpd-2.2.6/server/mpm/prefork/prefork-old.c 2007-10-24 15:15:41 -07:00 +++ httpd-2.2.6/server/mpm/prefork/prefork.c 2007-10-24 15:17:57 -07:00 @@ -949,6 +949,12 @@ ap_scoreboard_image->global->running_generation = ap_my_generation; } + /* initialize before adding the signal handlers to avoid a race + * condition which previously existed when a signal was received + * while the child processes were being spawned + */ + restart_pending = shutdown_pending = 0; + set_signals(); if (one_process) { @@ -993,8 +999,6 @@ apr_proc_mutex_name(accept_mutex), apr_proc_mutex_defname()); #endif - restart_pending = shutdown_pending = 0; - mpm_state = AP_MPMQ_RUNNING; while (!restart_pending && !shutdown_pending) {