Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Semaphore



On Nov 26, 2008, at 8:25 PM, Eli Bach <email@hidden> wrote:
On Nov 26, 2008, at 7:31 PM, Rakesh Singhal wrote:
Please suggest to create semaphore (cross-processes).

For stuff like this, where the documentation is either lacking or not there at all, I find banging in "macosx function/tool/etc" into google to provide a lot of useful information.


As well as specifically searching in lists.apple.com for Mac- specific API's.

I'll save him the trouble. sem_init() is a function for use on unnamed semaphores, which are not supported in Mac OS X (this is pretty clear if you include <unistd.h> and check the feature test macro _POSIX_SHARED_MEMORY_OBJECTS).


If sem_init() is called, it will send the calling process a SIGSYS and cause it to abort. If the signal is caught, the function will return ENOSYS. So no matter what you do, it's not going to do anything useful.

It would not be terrifically useful to document unsupported functions like sem_init().

-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.