Changeset 20917

Show
Ignore:
Timestamp:
11/12/07 11:58:34 (1 year ago)
Author:
patrick
Message:

Reset errno to 0 before calling sem_open(3). For some reason, this seems to
be critical for ensuring that sem_open(3) behaves correctly on Darwin 9.x
(Mac OS X 10.5).

Submitted by: Doug McCorkle? <mccdo at iastate dot edu>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vapor/vpr/md/POSIX/Sync/SemaphorePosix.cpp

    r20915 r20917  
    6262   // destructor. 
    6363   mSemaFile = mktemp(strdup("/tmp/vprsema.XXXXXX")); 
     64 
     65   // Reset the errno global variable because mktemp(3) should not have failed. 
     66   // This seems to be critical for getting proper behavior out of sem_open(3) 
     67   // on Darwin 9.x (Mac OS X 10.5). 
     68   errno = 0; 
    6469 
    6570   // ----- Allocate the named semaphore ----- //