httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
Date Tue, 01 Aug 2000 17:36:15 GMT
rbb         00/08/01 10:36:14

  Modified:    .        STATUS
               src      CHANGES
               src/modules/mpm/beos beos.c
               src/modules/mpm/dexter dexter.c
               src/modules/mpm/mpmt_beos mpmt_beos.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/mpm/prefork prefork.c
  Log:
  Add a NO_DETACH environment variable to all MPMs that understand
  ONE_PROCESS.  This allows Apache to start up without detaching from
  the controlling terminal, but also not going into single process mode.
  The main purpose of this patch is to make it very easy to debug the
  child process startup code.
  PR:	2144
  
  Revision  Changes    Path
  1.124     +1 -5      apache-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-2.0/STATUS,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- STATUS	2000/08/01 17:06:20	1.123
  +++ STATUS	2000/08/01 17:36:02	1.124
  @@ -1,5 +1,5 @@
   Apache 2.0 STATUS:
  -Last modified at [$Date: 2000/08/01 17:06:20 $]
  +Last modified at [$Date: 2000/08/01 17:36:02 $]
   
   Release:
   
  @@ -422,10 +422,6 @@
   
       * PR#2138: mod_status
         mod_status always displays 256 possible connection slots
  -	Status: 
  -
  -    * PR#2144: general
  -      apache always detaches for normal operation
   	Status: 
   
       * PR#2221: documentation
  
  
  
  1.188     +4 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -r1.187 -r1.188
  --- CHANGES	2000/07/31 14:50:43	1.187
  +++ CHANGES	2000/08/01 17:36:03	1.188
  @@ -1,4 +1,8 @@
   Changes with Apache 2.0a5
  +  *) Add an option to not detach from the controlling terminal without
  +     going into single process mode.  This allows for much easier
  +     debugging of the process startup code. [Ryan Bloom]
  +
     *) ab: don't use perror() to report the failure of an APR function.
        [Jeff Trawick]
   
  
  
  
  1.16      +3 -1      apache-2.0/src/modules/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/beos/beos.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- beos.c	2000/07/30 11:49:28	1.15
  +++ beos.c	2000/08/01 17:36:04	1.16
  @@ -851,13 +851,15 @@
   static void beos_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp)
   {
       static int restart_num = 0;
  +    int no_detach = 0;
   
       one_process = !!getenv("ONE_PROCESS");
  +    no_detach = !!getenv("NO_DETACH");
   
       /* sigh, want this only the second time around */
       if (restart_num++ == 1) {
           is_graceful = 0;
  -        if (!one_process)
  +        if (!one_process && !no_detach)
   	        ap_detach();
           server_pid = getpid();
       }
  
  
  
  1.120     +3 -1      apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- dexter.c	2000/07/31 15:39:09	1.119
  +++ dexter.c	2000/08/01 17:36:04	1.120
  @@ -1140,14 +1140,16 @@
   static void dexter_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp)
   {
       static int restart_num = 0;
  +    int no_detach = 0;
   
       one_process = !!getenv("ONE_PROCESS");
  +    no_detach = !!getenv("NO_DETACH");
   
       /* sigh, want this only the second time around */
       if (restart_num++ == 1) {
   	is_graceful = 0;
   
  -	if (!one_process) {
  +	if (!one_process && !no_detach) {
   	    ap_detach();
   	}
   
  
  
  
  1.45      +3 -1      apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mpmt_beos.c	2000/07/30 11:49:29	1.44
  +++ mpmt_beos.c	2000/08/01 17:36:08	1.45
  @@ -841,14 +841,16 @@
   static void mpmt_beos_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp)
   {
       static int restart_num = 0;
  +    int no_detach = 0;
   
       one_process = !!getenv("ONE_PROCESS");
  +    no_detach = !!getenv("NO_DETACH");
   
       /* sigh, want this only the second time around */
       if (restart_num++ == 1) {
   	is_graceful = 0;
   
  -	if (!one_process) {
  +	if (!one_process && !no_detach) {
   	    beosd_detach();
   	}
   
  
  
  
  1.116     +3 -1      apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- mpmt_pthread.c	2000/07/31 15:39:13	1.115
  +++ mpmt_pthread.c	2000/08/01 17:36:11	1.116
  @@ -1176,14 +1176,16 @@
   static void mpmt_pthread_pre_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptemp)
   {
       static int restart_num = 0;
  +    int no_detach = 0;
   
       one_process = !!getenv("ONE_PROCESS");
  +    no_detach = !!getenv("NO_DETACH");
   
       /* sigh, want this only the second time around */
       if (restart_num++ == 1) {
   	is_graceful = 0;
   
  -	if (!one_process) {
  +	if (!one_process && !no_detach) {
   	    ap_detach();
   	}
   	ap_my_pid = getpid();
  
  
  
  1.122     +3 -1      apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- prefork.c	2000/07/29 16:24:13	1.121
  +++ prefork.c	2000/08/01 17:36:13	1.122
  @@ -1529,14 +1529,16 @@
   static void prefork_pre_config(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp)
   {
       static int restart_num = 0;
  +    int no_detach = 0;
   
       one_process = !!getenv("ONE_PROCESS");
  +    no_detach = !!getenv("NO_DETACH");
   
       /* sigh, want this only the second time around */
       if (restart_num++ == 1) {
   	is_graceful = 0;
   
  -	if (!one_process) {
  +	if (!one_process && !no_detach) {
   	    ap_detach();
   	}
   
  
  
  

Mime
View raw message