Rudiments

- Main Page
- Classes

signalclasses.h
1 // Copyright (c) 1999-2002 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_SIGNALCLASSES_H
5 #define RUDIMENTS_SIGNALCLASSES_H
6
7 #include <rudiments/private/signalclassesincludes.h>
8
9 class signalsetprivate;
10
14 class RUDIMENTS_DLLSPEC signalset {
15 friend class signalmanager;
16 friend class signalhandler;
17 public:
18
20 signalset();
21
23 ~signalset();
24
27 bool addSignal(int32_t signum);
28
31 bool addAllSignals();
32
35 bool removeSignal(int32_t signum);
36
39 bool removeShutDownSignals();
40
43 bool removeCrashSignals();
44
47 bool removeAllSignals();
48
51 int32_t signalIsInSet(int32_t signum) const;
52
53 #include <rudiments/private/signalset.h>
54 };
55
56
57
60 class RUDIMENTS_DLLSPEC signalmanager {
61 public:
64 static bool sendSignal(pid_t processid, int32_t signum);
65
68 static bool raiseSignal(int32_t signum);
69
79 static uint32_t alarm(uint32_t seconds);
80
83 static bool ignoreSignals(const signalset *sset);
84
88 static bool waitForSignals(const signalset *mask);
89
94 static bool examineBlockedSignals(signalset *sset);
95 };
96
97
100 class signalhandlerprivate;
101 class RUDIMENTS_DLLSPEC signalhandler {
102 public:
103
105 signalhandler();
106
108 ~signalhandler();
109
112 void setHandler(void (*handler)(int32_t));
113
116 void (*getHandler())(int32_t);
117
124 bool handleSignal(int32_t signum);
125
134 bool handleSignal(int32_t signum, signalhandler *oldhandler);
135
137 void removeAllFlags();
138
141 void addFlag(int32_t flag);
142
145 void removeFlag(int32_t flag);
146
149 int32_t getFlags() const;
150
151
153 void setMask(const signalset *sset);
154
156 const signalset *getMask() const;
157
168 static bool isSignalHandlerIntUsed();
169
170 #include <rudiments/private/signalhandler.h>
171
172 };
173
174 #endif
signalhandler::getHandler
void(*)(int32_t) getHandler()
Definition: signalclasses.h:116
signalhandler
Definition: signalclasses.h:101
signalmanager
Definition: signalclasses.h:60
signalset
Definition: signalclasses.h:14