Posts

Post not yet marked as solved
2 Replies
721 Views
Hi,I have been developing a suit of inhouse applications (MacOS X, not iOS) for a client and I'm working I a "master application" to install/update the different applications in the toolset. Now I'm trying to figure out the best way to do what I did way back in the Objective-C times for another client, letting the programs, in case of something accidently goes terrible wrong, report to the "master application" something like "Mayday! Crash and burn here", so the master application can intercept that in some way ticket file in a Application Support folder or something similar, but after reading Quinn's (Hi Quinn, havent seen you since WWDC 2008 or G5 Optimization workshop in Stockholm 2003) nice piece on howto not make your own crashreporter (not really what I'm after anyway), I still stand clueless on the best approach to trap a crash. In the objective-C days I did this:// Signal handlervoid mySigHandler(int sig){ NSLog(@"##### SigHandler(%d) called", sig); // reset sighandler signal(sig, mySigHandler);// Do whatever I needed before gracefully dying in peace}and in main (whatever signals I wanted to handle// SIGTERM - registration signal( SIGTERM, mySigHandler);Cheers,/ Totte
Posted Last updated
.