Changes with Apache 2.0.35
+ *) worker and prefork MPMs: Add -DFOREGROUND switch to cause the
+ Apache parent process to run in the foreground (similar to -DNO_DETACH
+ except that it doesn't switch session ids). [Jeff Trawick]
+
*) Added support for Posix semaphore mutex locking (AcceptMutex posixsem)
for those platforms that support it. If using the default
implementation, this is between pthread and sysvsem in priority.
apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach, debug;
+ int no_detach, debug, foreground;
ap_directive_t *pdir;
ap_directive_t *max_clients = NULL;
apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
if (debug) {
- no_detach = one_process = 1;
+ foreground = one_process = 1;
}
else {
one_process = ap_exists_config_define("ONE_PROCESS");
no_detach = ap_exists_config_define("NO_DETACH");
+ foreground = ap_exists_config_define("FOREGROUND");
}
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
is_graceful = 0;
- if (!one_process) {
+ if (!one_process && !foreground) {
rv = apr_proc_detach(no_detach ? APR_PROC_DETACH_FOREGROUND
: APR_PROC_DETACH_DAEMONIZE);
if (rv != APR_SUCCESS) {