Difference between revisions of "cpp/utility/program"
From cppreference.com
m (Update links.) |
m (removed debugging support section (already moved to general utilities)) |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{title|Program support utilities}} | {{title|Program support utilities}} | ||
{{cpp/utility/program/navbar}} | {{cpp/utility/program/navbar}} | ||
− | |||
+ | ===Program termination=== | ||
The following functions manage program termination and resource cleanup. | The following functions manage program termination and resource cleanup. | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc header | cstdlib}} | + | {{dsc header|cstdlib}} |
− | {{dsc inc | cpp/utility/program/dsc abort}} | + | {{dsc inc|cpp/utility/program/dsc abort}} |
− | {{dsc inc | cpp/utility/program/dsc exit}} | + | {{dsc inc|cpp/utility/program/dsc exit}} |
− | {{dsc inc | cpp/utility/program/dsc quick_exit}} | + | {{dsc inc|cpp/utility/program/dsc quick_exit}} |
− | {{dsc inc | cpp/utility/program/dsc _Exit}} | + | {{dsc inc|cpp/utility/program/dsc _Exit}} |
− | {{dsc inc | cpp/utility/program/dsc atexit}} | + | {{dsc inc|cpp/utility/program/dsc atexit}} |
− | {{dsc inc | cpp/utility/program/dsc at_quick_exit}} | + | {{dsc inc|cpp/utility/program/dsc at_quick_exit}} |
− | {{dsc inc | cpp/utility/program/dsc EXIT_status}} | + | {{dsc inc|cpp/utility/program/dsc EXIT_status}} |
{{dsc end}} | {{dsc end}} | ||
− | === | + | {{rrev|since=c++23| |
+ | ===Unreachable control flow=== | ||
+ | {{dsc begin}} | ||
+ | {{dsc header|utility}} | ||
+ | {{dsc inc|cpp/utility/dsc unreachable}} | ||
+ | {{dsc end}} | ||
+ | }} | ||
+ | ===Communicating with the environment=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/utility/program/dsc system}} | + | {{dsc header|cstdlib}} |
− | {{dsc inc | cpp/utility/program/dsc getenv}} | + | {{dsc inc|cpp/utility/program/dsc system}} |
+ | {{dsc inc|cpp/utility/program/dsc getenv}} | ||
{{dsc end}} | {{dsc end}} | ||
===Signals=== | ===Signals=== | ||
− | |||
Several functions and macro constants for signal management are provided. | Several functions and macro constants for signal management are provided. | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc header | csignal}} | + | {{dsc header|csignal}} |
− | {{dsc inc | cpp/utility/program/dsc signal}} | + | {{dsc inc|cpp/utility/program/dsc signal}} |
− | {{dsc inc | cpp/utility/program/dsc raise}} | + | {{dsc inc|cpp/utility/program/dsc raise}} |
− | {{dsc typedef | cpp/utility/program/sig_atomic_t | the integer type that can be accessed as an atomic entity from an asynchronous signal handler}} | + | {{dsc typedef|cpp/utility/program/sig_atomic_t|the integer type that can be accessed as an atomic entity from an asynchronous signal handler}} |
− | {{dsc inc | cpp/utility/program/dsc SIG_strategies}} | + | {{dsc inc|cpp/utility/program/dsc SIG_strategies}} |
− | {{dsc inc | cpp/utility/program/dsc SIG_ERR}} | + | {{dsc inc|cpp/utility/program/dsc SIG_ERR}} |
− | {{dsc h2 | Signal types}} | + | {{dsc h2|Signal types}} |
− | {{dsc inc | cpp/utility/program/dsc SIG_types}} | + | {{dsc inc|cpp/utility/program/dsc SIG_types}} |
{{dsc end}} | {{dsc end}} | ||
===Non-local jumps=== | ===Non-local jumps=== | ||
− | |||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc header | csetjmp}} | + | {{dsc header|csetjmp}} |
− | {{dsc inc | cpp/utility/program/dsc setjmp}} | + | {{dsc inc|cpp/utility/program/dsc setjmp}} |
− | {{dsc inc | cpp/utility/program/dsc longjmp}} | + | {{dsc inc|cpp/utility/program/dsc longjmp}} |
− | {{dsc h2 | Types}} | + | {{dsc h2|Types}} |
− | {{dsc inc | cpp/utility/program/dsc jmp_buf}} | + | {{dsc inc|cpp/utility/program/dsc jmp_buf}} |
+ | {{dsc end}} | ||
+ | |||
+ | ===See also=== | ||
+ | {{dsc begin}} | ||
+ | {{dsc see c|c/program|Program support utilities|nomono=true}} | ||
{{dsc end}} | {{dsc end}} | ||
− | + | {{langlinks|de|es|fr|it|ja|pt|ru|zh}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 06:12, 16 December 2023
Contents |
[edit] Program termination
The following functions manage program termination and resource cleanup.
Defined in header
<cstdlib> | |
causes abnormal program termination (without cleaning up) (function) | |
causes normal program termination with cleaning up (function) | |
(C++11) |
causes quick program termination without completely cleaning up (function) |
(C++11) |
causes normal program termination without cleaning up (function) |
registers a function to be called on std::exit() invocation (function) | |
(C++11) |
registers a function to be called on std::quick_exit invocation (function) |
indicates program execution status (macro constant) |
Unreachable control flow
|
(since C++23) |
[edit] Communicating with the environment
Defined in header
<cstdlib> | |
calls the host environment's command processor (function) | |
access to the list of environment variables (function) |
[edit] Signals
Several functions and macro constants for signal management are provided.
Defined in header
<csignal> | |
sets a signal handler for particular signal (function) | |
runs the signal handler for particular signal (function) | |
the integer type that can be accessed as an atomic entity from an asynchronous signal handler (typedef) | |
defines signal handling strategies (macro constant) | |
return value of signal specifying that an error was encountered (macro constant) | |
Signal types | |
defines signal types (macro constant) |
[edit] Non-local jumps
Defined in header
<csetjmp> | |
saves the context (function macro) | |
jumps to specified location (function) | |
Types | |
execution context type (typedef) |
[edit] See also
C documentation for Program support utilities
|