HDK
|
#include <UT_CrashHandler.h>
Public Member Functions | |
UT_CrashHandler (const char *app_name) | |
virtual | ~UT_CrashHandler () |
virtual bool | handledSignal (UTsignalHandlerArg arg) |
virtual void | chaser (UTsignalHandlerArg arg) |
virtual bool | traceToStderr () const |
const char * | applicationName () const |
Return the application name. More... | |
void | setApplicationName (const char *app_name) |
Set the application name. More... | |
const UT_Signal * | signals () const |
Access to signals. More... | |
UTsigHandler | signalFunction () const |
Access to signal handler function. More... | |
Static Public Member Functions | |
static const UT_CrashHandler * | getCrashHandler () |
Access to the singleton. More... | |
This class handles crashing signals
This must be a singleton object. It traps crashing signals and handles them properly. a) When a thread catches a signal, the signal is passed to the main thread b) A stack trace is can be printed This detects recursion into the signal handler and takes appropriate action
Depending on the environment variable HOUDINI_COREDUMP, houdini will generate a core or
Definition at line 29 of file UT_CrashHandler.h.
|
explicit |
Construct using an array of signals. The array should be terminated by a zero.
|
virtual |
|
inline |
Return the application name.
Definition at line 69 of file UT_CrashHandler.h.
|
virtual |
This virtual allows the signal handler to have a "chaser" function, one which gets called after the stack trace has been printed out, but before core is actually dumped.
|
static |
Access to the singleton.
|
virtual |
A subclass gets a chance to handle the signal before the base class takes any action. If the method returns true
, the signal handler will just return from the signal handler and the process will continue. The default method returns false
, letting the signal be processed properly.
Also, please note that this method may be called multiple times. It may be called from a thread, then from the main thread, even for the same signal. When called for a thread, the same signal will always be invoked for the main thread, so you may only want to do your processing when UT_Thread::isMainThread() is true.
Please note that this is called from within a signal handler. The signal might have been raised within Python, so don't call Python from the handler. The signal handler might have been called within malloc()/free(), so there might be a system lock on malloc, so try not to call malloc/free from within your handler.
|
inline |
Set the application name.
Definition at line 73 of file UT_CrashHandler.h.
UTsigHandler UT_CrashHandler::signalFunction | ( | ) | const |
Access to signal handler function.
|
inline |
Access to signals.
Definition at line 77 of file UT_CrashHandler.h.
|
virtual |
Indicate whether the stack trace should be printed to stderr on a crash Defaults to true