Hi UNIX experts,
I'm trying to use semaphores to get named locks (like a Win32 MUTEX) between
2 concurrent threads.
The behaviour is not at all what I was expecting. Here is a resumé of my
char name = "/test";
semt* sem = sem_open(name,O_CREATE,0666,1);
Everything works fine when there is NO concurrent access. However when there
is, that is when the semaphore is locked in the first thread, the semaphore
cannot be OPENED by the second thread. The errno is EACCES. I was expecting
the second thread ...