#include <userver/os_signals/processor.hpp>
A client that allows to subscribe to OS signals SIGUSR1 and
SIGUSR2`.
Usually retrieved from os_signals::ProcessorComponent component. For tests use os_signals::ProcessorMock.
Definition at line 37 of file processor.hpp.
Public Member Functions | |
Processor (engine::TaskProcessor &task_processor) | |
template<class Class > | |
Subscriber | AddListener (Class *obj, std::string_view name, int signum, void(Class::*func)()) |
template<class Class > | |
Subscriber | AddListener (Class *obj, std::string_view name, void(Class::*func)(int)) |
Listen for all the OS signals. | |
|
inline |
Listen for a specific signal signum
. See the other overload for subscription to both signals.
Definition at line 44 of file processor.hpp.
|
inline |
Listen for all the OS signals.
Definition at line 58 of file processor.hpp.