Headers
<csetjmp> (nonlocal jumps),
<csignal> (signal handling),
<cstdarg> (variable arguments),
and
<cstdlib> (runtime environment getenv, system),
provide further compatibility with C code.
A call to the setlocale function
may introduce a data race with other
calls to the setlocale function or with calls to functions that are
affected by the current C locale.
The implementation shall behave as if no
library function other than locale::global calls the setlocale
function.
The function signature
longjmp(jmp_buf jbuf, int val)
has more restricted behavior in this document.
A setjmp/longjmp call pair has undefined
behavior if replacing the setjmp and longjmp
by catch and throw would invoke any non-trivial destructors for any objects
with automatic storage duration.
A call to setjmp or longjmp has undefined
behavior if invoked in a suspension context of a coroutine ([expr.await]).
namespace std {using sig_atomic_t =see below;
// [support.signal], signal handlersextern"C"usingsignal-handler=void(int); // exposition onlysignal-handler* signal(int sig, signal-handler* func);
int raise(int sig);
}#define SIG_DFL see below#define SIG_ERR see below#define SIG_IGN see below#define SIGABRT see below#define SIGFPE see below#define SIGILL see below#define SIGINT see below#define SIGSEGV see below#define SIGTERM see below
The function signal is signal-safe if it is invoked
with the first argument equal to the signal number
corresponding to the signal that caused the invocation of the handler.