Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

C signal handling and C++ exception handling

&pagelevel(5)&pagelevel

According to the C++ language definition, the use of C++ exception handling is not allowed in C signal routines. If a C signal routine is nonetheless reached by the runtime system during stack processing triggered by an exception, the system behaves as if the end of the stack were reached. Consequently, it is not possible to throw an exception from a signal routine or to rethrow an exception that was caught with catch before the signal routine was called. In such cases, terminate is invoked instead.

The function unwind_exit (see "Additional runtime functions") does not destroy all objects when called from signal routines. All automatic objects which were not deleted before the call to the signal routine and all exception objects that had not yet terminated are not destroyed in this case. However, the program still terminates with exit.