apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/locks/unix proc_mutex.c
Date Sat, 07 Jun 2003 12:37:48 GMT
trawick     2003/06/07 05:37:48

  Modified:    .        CHANGES
               locks/unix proc_mutex.c
  Log:
  Don't require the lock file name to be passed into
  apr_proc_mutex_child_init() or apr_global_mutex_child_init().
  This allows child init to work when the lock file was a temp
  file created by APR.  (The problem only occurred with flock-
  based mutexes.)
  
  Revision  Changes    Path
  1.417     +6 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.416
  retrieving revision 1.417
  diff -u -r1.416 -r1.417
  --- CHANGES	7 Jun 2003 12:04:42 -0000	1.416
  +++ CHANGES	7 Jun 2003 12:37:48 -0000	1.417
  @@ -1,5 +1,11 @@
   Changes with APR 0.9.4
   
  +  *) Don't require the lock file name to be passed into 
  +     apr_proc_mutex_child_init() or apr_global_mutex_child_init().
  +     This allows child init to work when the lock file was a temp
  +     file created by APR.  (The problem only occurred with flock-
  +     based mutexes.)  [Jeff Trawick]
  +
     *) When using a temporary file for flock- and fcntl-based mutexes, 
        don't let the file be deleted on close.  For flock-based mutexes,
        this corrects a fatal problem, since the file would disappear 
  
  
  
  1.32      +3 -0      apr/locks/unix/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- proc_mutex.c	7 Jun 2003 12:04:43 -0000	1.31
  +++ proc_mutex.c	7 Jun 2003 12:37:48 -0000	1.32
  @@ -682,6 +682,9 @@
   
       memcpy(new_mutex, *mutex, sizeof *new_mutex);
       new_mutex->pool = pool;
  +    if (!fname) {
  +        fname = (*mutex)->fname;
  +    }
       new_mutex->fname = apr_pstrdup(pool, fname);
       rv = apr_file_open(&new_mutex->interproc, new_mutex->fname,
                          APR_WRITE, 0, new_mutex->pool);
  
  
  

Mime
View raw message