#include <UT_Exit.h>
Definition at line 20 of file UT_Exit.h.
The enumeration of the exit codes that Houdini producs can use. (see notes in http://tldp.org/LDP/abs/html/exitcodes.html)
- Note
- The numeric values for the specific exit reasons should not change: some customers explicitly test the numeric value of the exit code and take a specific action based on it. E.g., they may test the exit code for the license failure on a render farm for re-submission, but if we change the exit code for license failure their scripts will need to be updated to account for that.
-
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.
Enumerator |
---|
EXIT_OK |
no error
|
EXIT_GENERIC_ERROR |
catch-all error code
|
EXIT_BUILTIN_ERROR |
misuse of shell builtins (according to Bash documentation)
|
EXIT_LICENSE_ERROR |
failure to check out or verify an appropriate product license
|
EXIT_SOCKET_ERROR |
socket communication failure
|
EXIT_PARSE_UI_ERROR |
failed to parse the UI definition file
|
EXIT_SSL_ERROR |
SSL related error.
|
EXIT_PROCESS_RUN_ERROR |
Process is already running.
|
Definition at line 36 of file UT_Exit.h.
Adds a callback to the end of the list of callbacks to be run when the process exits. Returns 1 if the function was added, the function can only be added one time. Returns 0 if this is a duplicate.
- Warning
- Destructors of global variables are called BEFORE the callback is invoked on Windows!
Just like exit(), except sets the exit code to the properly offset signal number according to the convention: 128 + signal_number.
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 bool UT_Exit::isExiting |
( |
| ) |
|
|
static |
Return true if the application is in the process of exiting and false otherwise.
static bool UT_Exit::isImplicitlyExiting |
( |
| ) |
|
|
static |
Return true if process is implicitly exiting, ie. from normal process termination. This will be false when exit callbacks are being run prior to process termination.
static void UT_Exit::registerPyAtExitCallback |
( |
void(*)(void *data) |
exitcallback, |
|
|
void * |
data = nullptr |
|
) |
| |
|
static |
Register a callback to run Python's atexit callbacks. DO NOT CALL THIS FUNCTION. The function should only be called by pyInitializePython() in PY_InterpreterAutoLock.C. If you want to register a Python exit callback, then call PYregisterAtExitCallback() from PY_Python.h instead.
static void UT_Exit::registerQtAppExitCallback |
( |
void(*)(void *data) |
exitcallback, |
|
|
void * |
data = nullptr |
|
) |
| |
|
static |
Register a callback to shut down the QApplication object (if any). DO NOT CALL THIS FUNCTION. The function should only be called by main() in AP_Main.C.
static void UT_Exit::removeAllExitCallbacks |
( |
| ) |
|
|
static |
Remove all the exit callbacks.
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.
Synonym for exit(UT_Exit::EXIT_OK).
Definition at line 78 of file UT_Exit.h.
The documentation for this class was generated from the following file: