6 #ifndef POSIXSIGNAL_HPP_INCLUDE
7 #define POSIXSIGNAL_HPP_INCLUDE
32 static std::unique_ptr<POSIXSignal>
make_unique(
void);
43 virtual sigset_t
make_sigset(
const std::set<int> &signal_set)
const = 0;
69 siginfo_t *info)
const = 0;
79 const struct timespec *timeout)
const = 0;
101 virtual void sig_action(
int signum,
const struct sigaction *act,
102 struct sigaction *oldact)
const = 0;
112 sigset_t *oldset)
const = 0;
130 sigset_t
make_sigset(
const std::set<int> &signal_set)
const override;
133 siginfo_t *info)
const override;
135 const struct timespec *timeout)
const override;
136 void sig_queue(pid_t pid,
int sig,
int value)
const override;
137 void sig_action(
int signum,
const struct sigaction *act,
138 struct sigaction *oldact)
const override;
140 sigset_t *oldset)
const override;
141 void sig_suspend(
const sigset_t *mask)
const override;
143 void check_return(
int err,
const std::string &func_name)
const;
Definition: POSIXSignal.hpp:16
virtual int sig_timed_wait(const sigset_t *sigset, siginfo_t *info, const struct timespec *timeout) const =0
Wrapper for sigtimedwait(2) that converts errors into Exceptions.
virtual ~POSIXSignal()=default
static std::unique_ptr< POSIXSignal > make_unique(void)
Factory method for POSIXSignal interface.
Definition: POSIXSignal.cpp:16
virtual int sig_wait_info(const sigset_t *sigset, siginfo_t *info) const =0
Wrapper for sigwaitinfo(2) that converts errors into Exceptions.
virtual void sig_action(int signum, const struct sigaction *act, struct sigaction *oldact) const =0
Wrapper for sigaction(2) that converts errors into Exceptions.
virtual void sig_queue(pid_t pid, int sig, int value) const =0
Wrapper for sigqueue(3) that converts errors into Exceptions.
virtual void sig_suspend(const sigset_t *mask) const =0
Wrapper for sigsuspend(2) that converts errors into Exceptions.
virtual sigset_t make_sigset(const std::set< int > &signal_set) const =0
Create a sigset_t from a set of signal numbers.
virtual m_info_s reduce_info(const siginfo_t &info) const =0
Extract the signal number, signal value integer and sending PID from a siginfo_t struct to simplify m...
virtual void sig_proc_mask(int how, const sigset_t *sigset, sigset_t *oldset) const =0
Wrapper for sigprocmask(2) that converts errors into Exceptions.
Definition: POSIXSignal.hpp:126
m_info_s reduce_info(const siginfo_t &info) const override
Extract the signal number, signal value integer and sending PID from a siginfo_t struct to simplify m...
Definition: POSIXSignal.cpp:33
void sig_proc_mask(int how, const sigset_t *sigset, sigset_t *oldset) const override
Wrapper for sigprocmask(2) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:70
void sig_suspend(const sigset_t *mask) const override
Wrapper for sigsuspend(2) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:75
int sig_wait_info(const sigset_t *sigset, siginfo_t *info) const override
Wrapper for sigwaitinfo(2) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:42
void sig_queue(pid_t pid, int sig, int value) const override
Wrapper for sigqueue(3) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:57
void sig_action(int signum, const struct sigaction *act, struct sigaction *oldact) const override
Wrapper for sigaction(2) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:64
int sig_timed_wait(const sigset_t *sigset, siginfo_t *info, const struct timespec *timeout) const override
Wrapper for sigtimedwait(2) that converts errors into Exceptions.
Definition: POSIXSignal.cpp:49
sigset_t make_sigset(const std::set< int > &signal_set) const override
Create a sigset_t from a set of signal numbers.
Definition: POSIXSignal.cpp:21
virtual ~POSIXSignalImp()=default
Reduced information set from siginfo_t struct defined in signal.h.
Definition: POSIXSignal.hpp:20
int signo
Definition: POSIXSignal.hpp:21
int pid
Definition: POSIXSignal.hpp:23
int value
Definition: POSIXSignal.hpp:22