Re: Are Mach Semaphore Process Shared?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Oct 1, 2009, at 2:13 AM, Abdulla Kamar wrote: Kevin _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... I've constructed a couple of mach semaphores in shared memory, which is shared between two processes. One semaphore seems to work, but the other returns "(os/kern) invalid name". Can I actually do this? Is there a way to pass semaphores between processes? Mach ports are similar to file descriptors in the sense that the mapping of name to port only exists within one process. I don't know whether it's possible or not, but you may be able to copy the mach port that represents the the semaphore (semaphore_t is a typedef of mach_port_t) to the remote process by sending it as out-of- line data in a mach message. This email sent to site_archiver@lists.apple.com
participants (1)
-
Kevin Van Vechten