C condition handling semantics
This section describes C condition handling in a POSIX(OFF) environment. If you run applications that contain POSIX functions, you should also read Language Environment and POSIX signal handling interactions, which discusses the interaction between POSIX signal handling and Language Environment condition handling.
C employs a global condition handling model, which, on initialization, defines the actions that are taken when a condition is raised. The actions defined by C apply to an entire enclave, not just to a routine or block within an enclave. You can alter a specific action that the C condition handler takes when a condition is raised, however, by coding signal() function calls in your applications.
C recognizes a number of errors; some correspond directly to the errors detected by the hardware or the operating system, and some are unique to C. All actions for condition handling are controlled by the contents of the C global error table. Table 1 contains default C-language error handling semantics.
C Condition | Origin | Default action |
---|---|---|
SIGILL |
|
Abnormal termination (return code=3000) |
SIGSEGV |
|
Abnormal termination (return code=3000) |
SIGFPE |
|
Abnormal termination (return code=3000) |
SIGABRT | abort() function
|
Abnormal termination (return code=2000) |
SIGABND | Abend the function | Abnormal termination (return code=3000) |
SIGTERM | Termination request
|
Abnormal termination (return code = 3000) |
SIGINT | Attention condition | Abnormal termination (return code = 3000) |
SIGIOERR | I/O errors | Ignore the condition |
SIGUSR1 | User-defined condition | Abnormal termination (return code=3000) |
SIGUSR2 | User-defined condition | Abnormal termination (return code=3000) |
Masked |
|
These exceptions are disabled. They are ignored during the condition handling process, even if you try to enable them using the CEE3SPM callable service. |