commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r804241 - in /commons/sandbox/runtime/trunk/src/main/native/os: hpux/shm.c unix/shm.c
Date Fri, 14 Aug 2009 14:33:26 GMT
Author: mturk
Date: Fri Aug 14 14:33:25 2009
New Revision: 804241

URL: http://svn.apache.org/viewvc?rev=804241&view=rev
Log:
Do not remove shm if we detached before

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/shm.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c?rev=804241&r1=804240&r2=804241&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c Fri Aug 14 14:33:25 2009
@@ -72,7 +72,7 @@
         }
     }
     /* name-based shared memory */
-    else {
+    else if (m->base) {
         /* Indicate that the segment is to be destroyed as soon
          * as all processes have detached. This also disallows any
          * new attachments to the segment.
@@ -81,7 +81,7 @@
             rc = ACR_GET_OS_ERROR();
             goto cleanup;
         }
-        if (m->base && shmdt(m->base) == -1) {
+        if (shmdt(m->base) == -1) {
             rc = ACR_GET_OS_ERROR();
             goto cleanup;
         }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/shm.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/shm.c?rev=804241&r1=804240&r2=804241&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/shm.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/shm.c Fri Aug 14 14:33:25 2009
@@ -72,7 +72,7 @@
         }
     }
     /* name-based shared memory */
-    else {
+    else if (m->base) {
         /* Indicate that the segment is to be destroyed as soon
          * as all processes have detached. This also disallows any
          * new attachments to the segment.



Mime
View raw message