]> granicus.if.org Git - apache/commitdiff
worker MPM: add -DFOREGROUND option to use when you want
authorJeff Trawick <trawick@apache.org>
Fri, 5 Apr 2002 00:18:14 +0000 (00:18 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 5 Apr 2002 00:18:14 +0000 (00:18 +0000)
             the parent process to run in the foreground

             (NO_DETACH is a special mode for running under
             programs like daemontools)

             the existing flag -DDEBUG turns on FOREGROUND
             now instead of NO_DETACH

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94441 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/mpm/worker/worker.c

diff --git a/CHANGES b/CHANGES
index 39fb332b5eacea9a6f9b5b24735461fdd79c94b6..bc0ca9221aa85244e0ae00a255ea0f52f2927a94 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 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.
index f3a858b0bb52ea69a12545749c39edc3f1668c9d..7e8354825d2e206c278d64edb8066777c86357b3 100644 (file)
@@ -1765,7 +1765,7 @@ static int worker_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;
     ap_directive_t *pdir;
     ap_directive_t *max_clients = NULL;
     apr_status_t rv;
@@ -1809,18 +1809,19 @@ static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
     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) {