A client that allows to subscribe to OS signals SIGUSR1 and
SIGUSR2`.
More...
#include <userver/os_signals/processor.hpp>
|
| 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.
|
|
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.
- See also
- Handling OS signals
Definition at line 37 of file processor.hpp.
◆ AddListener() [1/2]
template<class Class >
Subscriber os_signals::Processor::AddListener |
( |
Class * |
obj, |
|
|
std::string_view |
name, |
|
|
int |
signum, |
|
|
void(Class::*)() |
func |
|
) |
| |
|
inline |
Listen for a specific signal signum
. See the other overload for subscription to both signals.
Definition at line 44 of file processor.hpp.
◆ AddListener() [2/2]
template<class Class >
Subscriber os_signals::Processor::AddListener |
( |
Class * |
obj, |
|
|
std::string_view |
name, |
|
|
void(Class::*)(int) |
func |
|
) |
| |
|
inline |
Listen for all the OS signals.
Definition at line 58 of file processor.hpp.
The documentation for this class was generated from the following file: