httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/prefork prefork.c
Date Wed, 03 Apr 2002 13:45:58 GMT
trawick     02/04/03 05:45:58

  Modified:    server/mpm/prefork prefork.c
  Log:
  prefork MPM: add -DFOREGROUND option to use when you want
               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
  
  Revision  Changes    Path
  1.259     +6 -4      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.258
  retrieving revision 1.259
  diff -u -r1.258 -r1.259
  --- prefork.c	3 Apr 2002 13:38:06 -0000	1.258
  +++ prefork.c	3 Apr 2002 13:45:57 -0000	1.259
  @@ -1194,24 +1194,26 @@
   static int prefork_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;
       apr_status_t rv;
   
       debug = ap_exists_config_define("DEBUG");
   
  -    if (debug)
  -        no_detach = one_process = 1;
  +    if (debug) {
  +        foreground = one_process = 1;
  +    }
       else
       {
           no_detach = ap_exists_config_define("NO_DETACH");
           one_process = ap_exists_config_define("ONE_PROCESS");
  +        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) {
  
  
  

Mime
View raw message