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]
+ *) worker, prefork, perchild, beos 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
static int beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach, debug;
+ int no_detach, debug, foreground;
apr_status_t rv;
debug = ap_exists_config_define("DEBUG");
- if (debug)
- no_detach = one_process = 1;
+ if (debug) {
+ 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) {
static int perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach, debug;
+ int no_detach, debug, foreground;
ap_directive_t *pdir;
int i;
int tmp_server_limit = DEFAULT_SERVER_LIMIT;
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) {
static int perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach, debug;
+ int no_detach, debug, foreground;
ap_directive_t *pdir;
int i;
int tmp_server_limit = DEFAULT_SERVER_LIMIT;
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) {