Re: recognizing a crash
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