16#ifndef IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
17#define IOX_HOOFS_POSIX_WRAPPER_SIGNAL_WATCHER_HPP
19#include "iceoryx_hoofs/posix_wrapper/semaphore.hpp"
20#include "iceoryx_hoofs/posix_wrapper/signal_handler.hpp"
70 friend
void internalSignalHandler(
int) noexcept;
71 mutable std::atomic<uint64_t> m_numberOfWaiters{0U};
74 std::atomic_bool m_hasSignalOccurred{
false};
75 SignalGuard m_sigTermGuard;
76 SignalGuard m_sigIntGuard;
80void waitForTerminationRequest() noexcept;
83bool hasTerminationRequested() noexcept;
Posix semaphore C++ Wrapping class.
Definition semaphore.hpp:82
The SignalWatcher waits for SIGINT and SIGTERM. One can wait until the signal has occurred or ask the...
Definition signal_watcher.hpp:48
static SignalWatcher & getInstance() noexcept
Returns the singleton instance of the SignalWatcher.
bool wasSignalTriggered() const noexcept
Returns true when SIGTERM or SIGINT has occurred, otherwise false.
void waitForSignal() const noexcept
Blocks until either SIGTERM or SIGINT has occurred.
building block to easily create free function for logging in a library context
Definition lockfree_queue.hpp:29