[vlc-devel] [PATCH] Use Mach semaphores on Mac OS X

Jan-Hinrich Fessel Jan-Hinrich at fessel.org
Thu May 6 21:48:01 CEST 2010


Am 6.5.2010 schrieb "Juho Vähä-Herttua" <juhovh at iki.fi>:

>On 6.5.2010, at 21.02, Jan-Hinrich Fessel wrote:
>> Couldn't you just use the standard semaphore calls as defined in <semaphore.h> resp. <sys/semaphore.h>
>> where it states:
>As mentioned in earlier mail, sem_init doesn't work on Mac even though it's defined in the header and using sem_open+sem_unlink+sem_close is not a good idea. Current implementation uses the standard semaphore calls and crashes on OS X.

I was missing the "even though" part in the earlier mail, maybe I
overlooked it.
sem_open/close would only be a good idea if you bind it to the current
process or otherwise create a uniqe name (ala mktemp()), and that still
would not get rid of some security issues we don't want to have in the
first place.  maybe I should find a complete darwin copy to have a
deeper look at the wrappers, current Apple Libc on the web calls only


More information about the vlc-devel mailing list