Re: locks and unloading frameworks
Re: locks and unloading frameworks
- Subject: Re: locks and unloading frameworks
- From: Jean-Daniel Dupas <email@hidden>
- Date: Mon, 22 Mar 2010 23:25:50 +0100
Le 22 mars 2010 à 21:12, Joel Reymont a écrit :
> I'm using a third-party framework that takes an internal lock and then loads my framework. The lock seems to stay put when my framework crashes.
>
> I would think that all the locks should be gone when my app exits and all frameworks are unloaded.
>
> Is there such a thing as a 'resident' Mac framework that may be keeping the lock alive?
>
It depends how you create your "lock". By default, mutex are not shared across processes, but it's perfectly possible to create shared mutex and semaphores.
Can you give us more details about what kind of lock it is and how you init it ?
> Are all frameworks unloaded when an app exits or is there some other flaw in my thinking?
Yes they are. They are mapped in the application address space, and as the application address space is "destroyed" when the process is terminated, it is "unloaded"
> BTW, I killed all other apps that may have been using this third-party framework.
>
> Thanks, Joel
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden