apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apr/shmem/unix shm.c
Date Tue, 15 Jan 2002 14:24:51 GMT
jim         02/01/15 06:24:51

  Modified:    .        CHANGES
               shmem/unix shm.c
  Log:
  Mark SysV anon shared memory segments for deletion,
  so if we crash, they are removed
  
  Revision  Changes    Path
  1.208     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.207
  retrieving revision 1.208
  diff -u -r1.207 -r1.208
  --- CHANGES	13 Jan 2002 04:15:50 -0000	1.207
  +++ CHANGES	15 Jan 2002 14:24:51 -0000	1.208
  @@ -1,5 +1,8 @@
   Changes with APR b1  
   
  +  *) Make sure to pre-mark anon SysV shared memory segments as
  +     removed. [Jim Jagielski]
  +
     *) Add --with-efence to allow usage of Electric Fence.
        [Justin Erenkrantz]
   
  
  
  
  1.4       +5 -0      apr/shmem/unix/shm.c
  
  Index: shm.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/unix/shm.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- shm.c	11 Jan 2002 03:17:58 -0000	1.3
  +++ shm.c	15 Jan 2002 14:24:51 -0000	1.4
  @@ -194,6 +194,11 @@
   
           new_m->shmid = shmid;
   
  +        /* Remove the segment once use count hits zero. */
  +        if (shmctl(shmid, IPC_RMID, NULL) == -1) {
  +            return errno;
  +        }
  +
           *m = new_m;
           return APR_SUCCESS;
   #endif /* APR_USE_SHMEM_SHMGET_ANON */
  
  
  

Mime
View raw message