Re: switch off crash report log?
Re: switch off crash report log?
- Subject: Re: switch off crash report log?
- From: Terry Lambert <email@hidden>
- Date: Thu, 4 Mar 2010 12:25:04 -0800
On Mar 4, 2010, at 7:55 AM, IainS wrote:
Hello,
Is there any way to stop abort() from generating a crashlog? [leo
onwards]?
when hammering unit-testing code the system is being bogged down by
essentially useless crash reports.
in general - is there a way of stopping crashing code from
generating a disk file?
The abort() function sends the SIGABRT signal to the calling process.
The SIGABRT signal has the propert SA_CORE, meaning that it will
normally generate a core dump. So do SIGQUIT, SIGILL, SIGTRAP,
SIGEMT, SIGFPE, SIGBUS, SIGSEGV, and SIGSYS.
Any signal with the property SA_CORE AND which causes the process to
exit (by entering proc_prepare_exit()) will cause Crash Reporter to
report a crash.
So your options are, in preference order:
(1) Fix whatever underlying problem is resulting in abort() being
called.
(2) Don't call abort(); call _exit() instead
(3) Establish a signal handler for SIGABRT. In the handler, call
_exit()
(4) Establish your own Mach special port handler for the process in
question so you get the exception instead (requires privilege & a lot
of Mach knowledge, and will not be documented, since we could change
the internals; may fail in future releases)
(5) Disable Crash Reporter entirely
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden