Re: Are Mach Semaphore Process Shared?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -- Terry -- Thank you Abdulla _______________________________________________ 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/tlambert%40apple.com _______________________________________________ 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... You mean write the name to a socket and read the name on the other end of the socket and then open the named semaphore in the other process? Yes. You mean assume that the integer you get back is actually an fd, rather than an implementation detail that could change in the next SU, and that proper reference counting on the semaphore is done when you pass the fd around? No. On Oct 1, 2009, at 7:22 PM, Abdulla Kamar wrote: 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. Ah okay, thanks for that. On a related note is it possible to pass a POSIX named semaphore in Mac OS X over a UNIX socket? This email sent to tlambert@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert