You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/20 21:43:48 UTC

svn commit: r806323 - in /commons/sandbox/runtime/trunk/src/main/native/os/unix: pmutex.c psema.c

Author: mturk
Date: Thu Aug 20 19:43:48 2009
New Revision: 806323

URL: http://svn.apache.org/viewvc?rev=806323&view=rev
Log:
Be more permissive with the semaphores - Needs review

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c?rev=806323&r1=806322&r2=806323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/pmutex.c Thu Aug 20 19:43:48 2009
@@ -92,7 +92,7 @@
             *p = '_';
     }
     do {
-        m->sem = sem_open(m->name, O_CREAT | O_EXCL, 0644, 1);
+        m->sem = sem_open(m->name, O_CREAT | O_EXCL, 0666, 1);
         if (m->sem == (sem_t *)SEM_FAILED) {
             if (rc)
                 goto finally;
@@ -117,6 +117,7 @@
         m->name[0] = '\0';
     }
     m->locked = 0;
+
 finally:
     if (rc) {
         free(m);

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c?rev=806323&r1=806322&r2=806323&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/psema.c Thu Aug 20 19:43:48 2009
@@ -93,7 +93,7 @@
             *p = '_';
     }
     do {
-        s->sem = sem_open(s->name, O_CREAT | O_EXCL, 0644, value);
+        s->sem = sem_open(s->name, O_CREAT | O_EXCL, 0666, value);
         if (s->sem == (sem_t *)SEM_FAILED) {
             if (rc)
                 goto finally;
@@ -118,6 +118,7 @@
         s->name[0] = '\0';
     }
     s->locked = 0;
+
 finally:
     if (rc) {
         free(s);