httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apache-1.3/src/main http_main.c
Date Wed, 23 May 2001 16:57:25 GMT
bnicholes    01/05/23 09:57:25

  Modified:    src/main http_main.c
  Log:
  Added a clean up on exit routine to try to make sure that the ApacheC nlm
  on NetWare is exited gracefully even on an abnormal shutdown.  This fixes
  the Ouch! out of memory problem when trying to restart Apache for NetWare
  after an abnormal shutdown.
  
  Revision  Changes    Path
  1.536     +17 -0     apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.535
  retrieving revision 1.536
  diff -u -r1.535 -r1.536
  --- http_main.c	2001/04/12 17:49:26	1.535
  +++ http_main.c	2001/05/23 16:57:14	1.536
  @@ -2213,6 +2213,19 @@
   
   /* a clean exit from the parent with proper cleanup */
   #ifdef NETWARE
  +void clean_shutdown_on_exit(void)
  +{
  +    if (!ap_main_finished) {
  +        AMCSocketCleanup();
  +        ap_destroy_pool(pcommands);    
  +        free(ap_loaded_modules);    
  +        ap_cleanup_method_ptrs();    
  +        ap_destroy_pool(pglobal);
  +        ap_cleanup_alloc();
  +        ap_main_finished = TRUE;
  +    }
  +}
  +
   void clean_parent_exit(int code) __attribute__((noreturn));
   void clean_parent_exit(int code)
   #else
  @@ -6697,8 +6710,12 @@
   #endif
   
   #ifdef NETWARE
  +    // If top_module is not NULL then APACHEC was not exited cleanly
  +    //  and is in a bad state.  Simply clean up and exit.
  +    check_clean_load (top_module);
       init_name_space();
       signal(SIGTERM, signal_handler);
  +    atexit(clean_shutdown_on_exit);
       init_tsd();
   #endif
   
  
  
  

Mime
View raw message