site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com --Jim On Dec 6, 2006, at 9:34 AM, Eric Grant wrote: Thanks again, Eric Grant On 12/6/06 9:10 AM, "Dave Zarzycki" <zarzycki@apple.com> wrote: More to the point, how did you find yourself in such a scenario where the answer to that question matters? Have you considered using the tool called 'mig' to automate IPC stub generation and demux? davez On Dec 6, 2006, at 9:02 AM, Dave Zarzycki wrote: Why do you ask? davez On Dec 6, 2006, at 8:48 AM, Eric Grant wrote: The mach_msg man page states: http://www.opensource.apple.com/darwinsource/10.4.8.x86/xnu-792.13.8/osfmk/m an/mach_msg.html. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/jmagee%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I try to live by the adage "The only good timeouts are immediate timeouts." ;-) But if you must use a non-zero/non-infinite timeout (and think long and hard as to why), and that timeout is sufficiently large (so that there is a reasonable expectation of it getting interrupted by signals during the wait) then you must provide the MACH_RCV_INTERRUPT and/or MACH_SEND_INTERRUPT options and recalculate the relative timeout yourself (the mach_msg() library routine won't do that for you). I am doing simple IPC with mach messages, and I need a timeout mechanism. The alternatives of which I am aware -- creating the receive port using mk_timer_create(), or waiting on a port set that includes a timer -- are suboptimal in this situation. As for mig, I am aware of it, but it doesn't seem necessary. Everything seems to be working fine (save for this timeout issue). If MACH_RCV_TIMEOUT is used without MACH_RCV_INTERRUPT, then the timeout duration might not be accurate. When the call is interrupted and automatically retried, the original timeout is used. If interrupts occur frequently enough, the timeout interval might never expire. MACH_SEND_TIMEOUT without MACH_SEND_INTERRUPT suffers from the same problem. Is this statement true for Darwin's implementation of mach? This email sent to jmagee@apple.com This email sent to site_archiver@lists.apple.com