I have two Slackware Linux systems on which the POSIX semaphore sem_open()
call fails with errno set to 38. Sample code to reproduce below (the code works fine
Another way to share a semaphore across processes is to use SystemV semaphores.
These do work even where shared POSIX semaphores don't (at least on the systems described above.).
See http://www.linuxdevcenter.com/pub/a/linux/2007/05/24/semaphores-in-linux.html for examples of the two types of semaphore use.