Re: alternatives to signals like try/catch
Re: alternatives to signals like try/catch
- Subject: Re: alternatives to signals like try/catch
- From: "Daniel Walter" <email@hidden>
- Date: Tue, 5 Oct 2010 17:56:46 -0400
- Importance: Normal
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?
-setjmp/longjmp?
A third-party library should likely not be handling any signals- if this
is about SIGPIPE, flip that off and check for EPIPE instead.
Cheers,
M _______________________________________________
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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden