site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Importance: Normal -setjmp/longjmp? Cheers, M _______________________________________________ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... For shared objects such as ODBC drivers and browser plugins, it would be nice to handle signals without changing them in the main program. In Windows try/catch blocks handle these types of problems, but for Mac and Unix, there doesn't really seem to be a great alternative. The best I am seeing is to change all of the signals with sigaction one at a time every time a call passes into my shared object and change them all back with sigaction as this call returns. Are there any other alternatives? A third-party library should likely not be handling any signals- if this is about SIGPIPE, flip that off and check for EPIPE instead. I am writing the third-party library's and need these library's to handle signals. In particular I am looking to trap things like NULL pointer references and divide by zero errors, but SIGPIPE and other signals are important as well. We use crash dumps generated from these failures to improve our software quality. Additionally, our crashes are less damaging because they don't bring down larger applications. While I want to trap the problems that occur while executing my third party library code, I want my program to be generally well behaved and not screw around with the signals that occur while running the main program. Daniel This email sent to site_archiver@lists.apple.com