1/*
2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef SIGNAL_INFO_H
6#define SIGNAL_INFO_H
7
8#include <signal.h>
9
10#include "Types.h"
11
12
13class SignalInfo {
14public:
15								SignalInfo();
16								SignalInfo(const SignalInfo& other);
17								SignalInfo(int signal,
18									const struct sigaction& handler,
19									bool deadly);
20
21			void				SetTo(int signal,
22									const struct sigaction& handler,
23									bool deadly);
24
25			int					Signal() const	{ return fSignal; }
26			const struct sigaction&	Handler() const	{ return fHandler; }
27			bool				Deadly() const 	{ return fDeadly; }
28private:
29			int 				fSignal;
30			struct sigaction	fHandler;
31			bool				fDeadly;
32};
33
34
35#endif	// SIGNAL_INFO_H
36