diff options
author | Jeff Trawick <trawick@apache.org> | 2002-04-05 02:34:22 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2002-04-05 02:34:22 +0200 |
commit | 3f396cfdbc53d183eb09b68fb83a95d2c06e12c8 (patch) | |
tree | e65908f5bdbc4037e203becc7ba68c235c794445 /server/mpm/experimental/perchild | |
parent | worker MPM: add -DFOREGROUND option to use when you want (diff) | |
download | apache2-3f396cfdbc53d183eb09b68fb83a95d2c06e12c8.tar.xz apache2-3f396cfdbc53d183eb09b68fb83a95d2c06e12c8.zip |
implement FOREGROUND for perchild and beos MPMs too
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94442 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/experimental/perchild')
-rw-r--r-- | server/mpm/experimental/perchild/perchild.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index b6b0ed7c27..c41afc3acb 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -1454,7 +1454,7 @@ static int perchild_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp 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; @@ -1464,18 +1464,19 @@ static int perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptem 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) { |