]> granicus.if.org Git - apache/commitdiff
Stop using environment variables to set ONE_PROCESS and NO_DETACH. Now
authorRyan Bloom <rbb@apache.org>
Fri, 12 Jan 2001 00:56:13 +0000 (00:56 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 12 Jan 2001 00:56:13 +0000 (00:56 +0000)
we use the -D command line argument to Apache to configure these
options.
Submitted by: Greg Stein

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

CHANGES
server/mpm/beos/beos.c
server/mpm/dexter/dexter.c
server/mpm/experimental/perchild/perchild.c
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/perchild/perchild.c
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/spmt_os2.c
server/mpm/winnt/mpm_winnt.c

diff --git a/CHANGES b/CHANGES
index c89e4354f32cde62f7d77ef5fbd3d39952b630af..fa75640c83612d1a0ffee77cc2d1fe0174e9232c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
 Changes with Apache 2.0b1
 
+  *) Stop using environment variables to force debug mode or
+     no detach.  We now use the -D command line argument to 
+     specify the correct mode.  -DONE_PROCESS and -DNO_DETACH.
+     [Greg Stein]
+
   *) Change handlers to use hooks. [Ben Laurie]
 
   *) Stop returning copies of filenames from both apr_file_t and
index eda7446a3ab7d84b7d06774d64f220bcddada83d..1f49e7c87be4f368ae8e27d0b378ceccc63e0c56 100644 (file)
@@ -813,8 +813,8 @@ static void beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
     static int restart_num = 0;
     int no_detach = 0;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index cb572124de910d80f330300ca43673fa072a3c46..6abf8c94bf6f5da1159669c1a5e054c35fe25c51 100644 (file)
@@ -1127,8 +1127,8 @@ static void dexter_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp
     static int restart_num = 0;
     int no_detach = 0;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index 8c8d7fc162904b98832af1f625495404c1e43b3c..b93a03c7118e63d3bfba7024a53756a4259e942a 100644 (file)
@@ -1299,8 +1299,8 @@ static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pte
     int no_detach = 0;
     int i;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index 3f907c2bd4a6150b5c081c3e6afe3783805d6e26..dc0747ada2f46f2a6c8fc65c73816d9bcc9a67f0 100644 (file)
@@ -820,8 +820,8 @@ static void mpmt_beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t
     static int restart_num = 0;
     int no_detach = 0;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index 131e68fb08655a356ab9b670b9ebb3c318c9c310..2a31c75d2062882beee6b5574b6592977e7104b9 100644 (file)
@@ -1162,8 +1162,8 @@ static void mpmt_pthread_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_poo
     static int restart_num = 0;
     int no_detach = 0;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index 8c8d7fc162904b98832af1f625495404c1e43b3c..b93a03c7118e63d3bfba7024a53756a4259e942a 100644 (file)
@@ -1299,8 +1299,8 @@ static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pte
     int no_detach = 0;
     int i;
 
-    one_process = !!getenv("ONE_PROCESS");
-    no_detach = !!getenv("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
index af40c85b1b42afa38a031c5c8bfea529c917e68e..26b76bb03590a6b89e3c34a81186ed4c793117b2 100644 (file)
@@ -1547,7 +1547,8 @@ static void prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptem
     static int restart_num = 0;
     int no_detach = 0;
 
-    no_detach = !!getenv("NO_DETACH");
+    no_detach = !!ap_exists_config_define("NO_DETACH");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
 
     /* sigh, want this only the second time around */
     if (restart_num++ == 1) {
@@ -1581,7 +1582,6 @@ static void prefork_hooks(void)
 #ifdef AUX3
     (void) set42sig();
 #endif
-    one_process = !!getenv("ONE_PROCESS");
 
     ap_hook_pre_config(prefork_pre_config, NULL, NULL, AP_HOOK_MIDDLE);
 }
index 3b181a581a0156c06c9ece9ed99008aa895d77c0..8aaccc84862327f8b96455df6c63e3f2296992ae 100644 (file)
@@ -1366,7 +1366,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
 
 static void spmt_os2_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 {
-    one_process = !!getenv("ONE_PROCESS");
+    one_process = !!ap_exists_config_define("ONE_PROCESS");
 
     is_graceful = 0;
     ap_listen_pre_config();
index 78e5a407f2b7dd1ea9bdb62d969279a7855d707a..0bddb56ed822dd41957d5f76420806ac0c650b6c 100644 (file)
@@ -1835,7 +1835,7 @@ void winnt_rewrite_args(process_rec *process)
     GetVersionEx(&osver);
 
     /* AP_PARENT_PID is only valid in the child */
-    pid = getenv("AP_PARENT_PID");
+    pid = ap_exists_config_define("AP_PARENT_PID");
     if (pid) 
     {
         /* This is the child */
@@ -2028,7 +2028,7 @@ static void winnt_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
      */
     apr_status_t rv;
 
-    if (getenv("ONE_PROCESS"))
+    if (ap_exists_config_define("ONE_PROCESS"))
         one_process = -1;
 
     if (ap_exists_config_define("ONE_PROCESS"))