Re: How to disable Apple's Bug Report Dialog when application crash?
Re: How to disable Apple's Bug Report Dialog when application crash?
- Subject: Re: How to disable Apple's Bug Report Dialog when application crash?
- From: Goran Predovic <email@hidden>
- Date: Thu, 22 Jul 2004 09:32:36 +0200
On Jul 21, 2004, at 6:20 PM, Scott Thompson wrote:
You could set your application up as two separate processes, The
first has two responsibilities... launch the second (the one that
actually gets work done) and wait for it's child to die. If the child
dies without sending the "I'm dying normally" message then you put up
your dialog.
On Jul 21, 2004, at 5:52 PM, David Wilson wrote:
Getting somewhat low-level here, in main() you could fork() your
application. The child process could then run as it always does, but
the parent could wait (wait_pid() is the unix call, I believe) for the
child to die. You can then look at the return value gotten from
wait_pid() to see if the child process shut down normally or died from
a signal (term/kill/etc), and then either just close the parent or put
up a dialog box.
I believe there's a nice way to get debugging information out of the
child, too, but I don't recall it offhand.
I put in main() function code like this:
signal ( SIGTRAP, myHandler);
signal ( ... other error signals ... , myHandler);
and after application crash (I simulate in program sending message to
invalid object and app get signal SIGTRAP) it works fine, myHandler()
function is invoked. But Apple's dialog also shown, and I just want to
disable it.
So, I guess I know how to handle app crash with my own bug report
dialog - only don't know how to disable apple's dialog.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.