Hey list,

Earlier today I spent awhile trying to re-find some sample code that I
discovered awhile ago. I eventually found it, and thought I would
mention it here in hopes that it'll help someone in the future.

It allows you to handle signals safely within your app's runloop,
rather than trying to muck around within the signal handler with all
the issues that entails. Check it out here:

http://developer.apple.com/SampleCode/PreLoginAgents/listing2.html

The function's called InstallHandleSIGTERMFromRunLoop. It's 10.5-only,
because it uses some new facilities like CFFileDescriptor and some new
kevent stuff. It could be easily modified to handle other signals, or
rewritten to be more Cocoa-esque. Anyway, it's pretty much the best
code snippet ever.

David
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to