#include <UT_Exit.h>
Public Types | |
| enum | UT_ExitCode { EXIT_OK = 0, EXIT_GENERIC_ERROR = 1, EXIT_BUILTIN_ERROR = 2, EXIT_LICENSE_ERROR = 3, EXIT_SOCKET_ERROR = 4, EXIT_PARSE_UI_ERROR = 5 } |
Static Public Member Functions | |
| static void | exit (UT_ExitCode exit_code=EXIT_OK) |
| Calls exit(), which implicitly leads to our callbacks being called. | |
| static void | exitWithSignalNumber (int signal_number) |
| static void | exitWithSpecificCode (int exit_code) |
| static void | runExitCallbacks () |
| static int | addExitCallback (void(*exitcallback)(void *data), void *data=0) |
| static int | removeExitCallback (void(*exitcallback)(void *data), void *data=0) |
| static void | removeAllExitCallbacks () |
| Remove all the exit callbacks. | |
Definition at line 28 of file UT_Exit.h.
| enum UT_Exit::UT_ExitCode |
The enumeration of the exit codes that Houdini producs can use. (see notes in http://tldp.org/LDP/abs/html/exitcodes.html)
Don't use exit code value of 259. On Windows, the exit code 259 means STILL_ACTIVE, and should not be used as an exit error code; otherwise the return value of GetExitCodeProcess() calls may be misinterpreted.
| static int UT_Exit::addExitCallback | ( | void(*)(void *data) | exitcallback, | |
| void * | data = 0 | |||
| ) | [static] |
Returns 1 if the function was added, the function can only be added one time. Returns 0 if this is a duplicate.
| static void UT_Exit::exit | ( | UT_ExitCode | exit_code = EXIT_OK |
) | [static] |
Calls exit(), which implicitly leads to our callbacks being called.
| static void UT_Exit::exitWithSignalNumber | ( | int | signal_number | ) | [static] |
Just like exit(), except sets the exit code to the properly offset signal number according to the convention: 128 + signal_number.
| static void UT_Exit::exitWithSpecificCode | ( | int | exit_code | ) | [static] |
An exit method that takes any exit code (as integer). Should be used sparingly and only if necessary. We want the exit codes to be consistent, stable and well-known to the customers (we can document based on the above enum), so use exit() with UT_ExitCode, if possible.
| static void UT_Exit::removeAllExitCallbacks | ( | ) | [static] |
Remove all the exit callbacks.
| static int UT_Exit::removeExitCallback | ( | void(*)(void *data) | exitcallback, | |
| void * | data = 0 | |||
| ) | [static] |
Returns 1 if the function was removed. Returns 0 if the function was never added.
| static void UT_Exit::runExitCallbacks | ( | ) | [static] |
Calls our callbacks directly, without calling exit(). This should only be used by our core dump handler.
1.5.9