Function utils::sigtermWasReceived
Defined in File SigtermGuard.hpp
Function Documentation
-
inline auto utils::sigtermWasReceived() -> bool
Check whether a SIGTERM has been caught since the currently-installed SigtermGuard was constructed.
See sigtermReceived’s own comment for why this is a “#pragma omp
atomic read” rather than a plain read of a volatile sig_atomic_t, despite that alone already being signal-handler-safe
- Returns:
true if signalHandler() has run since the currently- installed SigtermGuard reset sigtermReceived to 0, false otherwise