Re: Responding to kill signals with the run loop
Re: Responding to kill signals with the run loop
- Subject: Re: Responding to kill signals with the run loop
- From: Jamie Hardt <email@hidden>
- Date: Wed, 3 Mar 2010 20:56:17 -0800
Thanks!
On Mar 3, 2010, at 7:28 PM, Ken Ferry wrote:
> In 10.6 you can also do this by setting a dispatch queue on which you want a block invoked when a signal comes in. If you give it the main dispatch queue, that's like installing on the runloop of the main thread.
>
> See <dispatch/source.h>.
>
> This is also nice because it's in _addition_ to signal handlers, not a replacement for signal handlers, and more than one thing can register to be notified about the signal.
>
> You still have to register a signal handler to avoid having the signal kill your app.
>
> -Ken
>
> On Wed, Mar 3, 2010 at 6:13 PM, Dave Keck <email@hidden> wrote:
> This can be done using kevents. See the
> InstallHandleSIGTERMFromRunLoop function, here:
>
> http://developer.apple.com/mac/library/samplecode/PreLoginAgents/listing2.html
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden