Originally posted by: SystemAdmin
C++/C users,
When calling a C library from C++, division by zero or invalid dereference,
aborts with a signal (e.g. SIGSEGV).
I understand that ANSI C does not support exceptions,
but I vaguely remember a simple (<10 line) idiom that would throw an exception
on a C/ANSI/POSIX signal.
This provided an opportunity to save debugging info regarding the C++ state
at the time of the call,
and at least directed debugging toward the errant library caller.
My swiss-cheese memory associates the idiom with sigaction(2).
Can anyone point me to this idiom?
TIA,
#AIX-Forum