userver: os_signals::Processor Class Reference
Loading...
Searching...
No Matches
os_signals::Processor Class Referencefinal

#include <userver/os_signals/processor.hpp>

Detailed Description

A client that allows to subscribe to OS signals SIGUSR1 andSIGUSR2`.

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.

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.
 

Member Function Documentation

◆ 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: