Re: What if process crashes while holding a locked semaphore?
Re: What if process crashes while holding a locked semaphore?
- Subject: Re: What if process crashes while holding a locked semaphore?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 2 Apr 2009 13:26:48 -0700
On 2009 Apr 01, at 19:33, Quinn wrote:
When using Mach ports like this, you have to be very careful about
bootstrap namespaces. Each process inherits a reference to a
bootstrap namespace, meaning that which namespace it registers in
depends on how it was launched. A port registration will only fail
if the conflicting process is in the same namespace. This may or
may not be what you want.
TN2083 has all the gory details.
Thanks, Quinn. I believe I'm OK since my mutually-exclusive processes
are all current-user agents launched by launchd to fulfill tasks in ~/
Library/LaunchAgents. So, I am obeying the "rules to remember" in
TN2083, and they should all be in the same namespace.
I've added your comments to my code for future reference. Maybe when
needed I'll be able to find a nice Cocoa interface to Unix Domain
Sockets.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden