Program support utilities - cppreference.com (original) (raw)
Program support utilities
Contents
- 1 Program termination
- 2 Unreachable control flow
- 3 Communicating with the environment
- 4 Signals
- 5 Non-local jumps
- 6 See also
[edit] Program termination
The following functions manage program termination and resource cleanup.
| Defined in header | |
|---|---|
| abort | causes abnormal program termination (without cleaning up) (function) [edit] |
| exit | causes normal program termination with cleaning up (function) [edit] |
| quick_exit(C++11) | causes quick program termination without completely cleaning up (function) [edit] |
| _Exit(C++11) | causes normal program termination without cleaning up (function) [edit] |
| atexit | registers a function to be called on std::exit() invocation (function) [edit] |
| at_quick_exit(C++11) | registers a function to be called on std::quick_exit invocation (function) [edit] |
| EXIT_SUCCESSEXIT_FAILURE | indicates program execution status (macro constant) [edit] |
| Unreachable control flow | (since C++23) |
|---|
[edit] Communicating with the environment
[edit] Signals
Several functions and macro constants for signal management are provided.
| Defined in header | |
|---|---|
| signal | sets a signal handler for particular signal (function) [edit] |
| raise | runs the signal handler for particular signal (function) [edit] |
| sig_atomic_t | the integer type that can be accessed as an atomic entity from an asynchronous signal handler (typedef) |
| SIG_DFLSIG_IGN | defines signal handling strategies (macro constant) [edit] |
| SIG_ERR | return value of signal specifying that an error was encountered (macro constant) [edit] |
| Signal types | |
| SIGABRTSIGFPESIGILLSIGINTSIGSEGVSIGTERM | defines signal types (macro constant) [edit] |