From nightly tests: securitytip/20071217.1/LEIA.2-WINNT5.0_OPT.OBJ semaping FAILED BEGIN TEST: semaping (2007-11-17 02:44:50) warning: removed shared memory /tmp/counter left over from previous run warning: removed semaphore /tmp/foo.sem left over from previous run warning: removed semaphore /tmp/bar.sem left over from previous run PR_OpenSharedMemory failed (-5974, 8) END TEST: semaping (2007-11-17 02:44:50) TEST STATUS: semaping = FAILED (errno 1)
The test found /tmp/foo.sem and /tmp/bar.sem on Windows?
Seems that PR_DeleteSharedMemory and PR_DeleteSemaphore passed on Windows for those filenames, although I haven't found /tmp directory on the machine. But our Windows tools supports also paths beginning with '/' character.
I got the following on Mac OS X with NSPR version 4.6.8: $ DYLD_LIBRARY_PATH=../../dist/lib ./semaping PR_OpenSemaphore failed (-5992, 0) $ Then I have to manually delete a "/tmp/counter" file....
The semaping test failure on Mac OS X is for a different reason. NSPR interprocess semaphores are not implemented on Mac OS X because the OS lacks the necessary functions. This is why PR_OpenSemaphore fails with error -5992 (PR_NOT_IMPLEMENTED_ERROR).
(note: identical comment in bug 307582) Is there a bug in the system somewhere saying something like 'no implementation of semaphores for Mac'? I searchd for 'semaphore' in any comment and did not find one. It is possible to do some kind of semaphore on a Mac. So, what is the actual issue? Bug 408799 says there is something missing on the Mac. If so, do you have a radar bug # for a bug with Apple? If there is such a bug, I might be able to track it down with people in Apple.
Ray: there is no bug report for implementing NSPR interprocess semaphores for Mac. We need either System V semaphores (semget) or POSIX semaphores (sem_open). When I worked on NSPR interprocess semaphores, neither existed on Mac OS X. Since Mac OS X was just released then, it didn't bother me that it lacked those functions. It's possible that current versions have Mac OS X have these functions. If you're interested in fixing the semaphore-related test failures on Mac OS X, please open a new bug and we'll discuss there. We can either implement these functions on Mac OS X or make those tests pass if PR_OpenSemaphore fails with PR_NOT_IMPLEMENTED_ERROR. Mozilla clients aren't using PR_OpenSemaphore: http://lxr.mozilla.org/mozilla/ident?i=PR_OpenSemaphore If you're interested in NSPR because of Mozilla, you don't need to implement PR_OpenSemaphore.