/* * Raise an EXC_CRASH exception on the dying task. * This should tell launchd to launch Crash Reporter for this task. */ kern_return_t abnormal_exit_notify(mach_exception_data_type_t exccode, mach_exception_data_type_t excsubcode) { mach_exception_data_type_t code[EXCEPTION_CODE_MAX]; wait_interrupt_t wsave; code[0] = exccode; code[1] = excsubcode; wsave = thread_interrupt_level(THREAD_UNINT); exception_triage(EXC_CRASH, code, EXCEPTION_CODE_MAX); (void) thread_interrupt_level(wsave); return (KERN_SUCCESS); }
void arm_mach_do_exception(void) { exception_triage(0, 0, 0); }