httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/prefork prefork.c
Date Fri, 01 Dec 2000 17:41:29 GMT
trawick     00/12/01 09:41:28

  Modified:    src/modules/mpm/prefork prefork.c
  Log:
  If apr_lock() or apr_unlock() fail, write a log message before bailing
  out.
  
  Revision  Changes    Path
  1.137     +8 -2      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.136
  retrieving revision 1.137
  diff -u -r1.136 -r1.137
  --- prefork.c	2000/11/26 04:47:41	1.136
  +++ prefork.c	2000/12/01 17:41:26	1.137
  @@ -291,13 +291,19 @@
   static void accept_mutex_on(void)
   {
       apr_status_t rv = apr_lock(accept_lock);
  -    ap_assert(!rv);
  +    if (rv != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't grab the accept mutex");
  +        exit(APEXIT_CHILDFATAL);
  +    }
   }
   
   static void accept_mutex_off(void)
   {
       apr_status_t rv = apr_unlock(accept_lock);
  -    ap_assert(!rv);
  +    if (rv != APR_SUCCESS) {
  +        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't release the accept mutex");
  +        exit(APEXIT_CHILDFATAL);
  +    }
   }
   
   /* On some architectures it's safe to do unserialized accept()s in the single
  
  
  

Mime
View raw message