• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Safe Signal Handling from the Run Loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Safe Signal Handling from the Run Loop


  • Subject: Safe Signal Handling from the Run Loop
  • From: Dave Keck <email@hidden>
  • Date: Sun, 19 Apr 2009 10:01:06 -1000

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 (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

  • Prev by Date: Keeping IB class instance and xCode instance the same
  • Next by Date: Bindings Update with Drag-and-Drop [solved]
  • Previous by thread: Re: Keeping IB class instance and xCode instance the same
  • Next by thread: Bindings Update with Drag-and-Drop
  • Index(es):
    • Date
    • Thread