• 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
Re: recognizing a crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recognizing a crash


  • Subject: Re: recognizing a crash
  • From: Sean Murphy <email@hidden>
  • Date: Fri, 23 Mar 2007 12:05:59 -0400


On Mar 23, 2007, at 10:43 AM, Justin R. Miller wrote:

How might I go about recognizing, either internal to a program or maybe with a wrapper program, whether an application has crashed and responding to it as soon as possible? One example that won't work is checking the crash log upon restart -- I'd like something that recognizes almost immediately and performs a certain action.

Hey Justin,

You can handle certain signals, such as the notorious SIGSEGV or SIGBUS, that are delivered to your application as one method of detecting and responding to a crash.

If, by chance, you have the "Advanced Mac OS X Programming" Dalrymple/ Hillegass book handy, Chapter 7 covers this topic very well. Otherwise, just look over the 'signal' man page for information about how to register a signal handler and an overview of the various types of signals.

An excellent example of this technique can be found in Adium's AICrashController, at <http://trac.adiumx.com/browser/trunk/Source/ AICrashController.m>.

Hope that helps,
-Sean
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >recognizing a crash (From: "Justin R. Miller" <email@hidden>)

  • Prev by Date: Subclass NSTypesetter to hide characters with a certain attribute?
  • Next by Date: Cocoa Scripting, CoreData and make command
  • Previous by thread: recognizing a crash
  • Next by thread: Subclass NSTypesetter to hide characters with a certain attribute?
  • Index(es):
    • Date
    • Thread