aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/SignalHandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/SignalHandler.cc')
-rw-r--r--src/FbTk/SignalHandler.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/FbTk/SignalHandler.cc b/src/FbTk/SignalHandler.cc
index d78c42c..ddb3766 100644
--- a/src/FbTk/SignalHandler.cc
+++ b/src/FbTk/SignalHandler.cc
@@ -19,13 +19,13 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: SignalHandler.cc,v 1.1 2002/11/26 16:01:27 fluxgen Exp $ 22// $Id: SignalHandler.cc,v 1.2 2002/11/27 21:47:46 fluxgen Exp $
23 23
24#include "SignalHandler.hh" 24#include "SignalHandler.hh"
25 25
26namespace FbTk { 26namespace FbTk {
27 27
28EventHandler<SignalEvent> *SignalHandler::s_signal_handler[NSIG]; 28SignalEventHandler *SignalHandler::s_signal_handler[NSIG];
29 29
30SignalHandler::SignalHandler() { 30SignalHandler::SignalHandler() {
31 // clear signal list 31 // clear signal list
@@ -38,8 +38,8 @@ SignalHandler *SignalHandler::instance() {
38 return &singleton; 38 return &singleton;
39} 39}
40 40
41bool SignalHandler::registerHandler(int signum, EventHandler<SignalEvent> *eh, 41bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh,
42 EventHandler<SignalEvent> **oldhandler_ret) { 42 SignalEventHandler **oldhandler_ret) {
43 // must be less than NSIG 43 // must be less than NSIG
44 if (signum >= NSIG) 44 if (signum >= NSIG)
45 return false; 45 return false;
@@ -72,9 +72,7 @@ void SignalHandler::handleSignal(int signum) {
72 return; 72 return;
73 // make sure we got a handler for this signal 73 // make sure we got a handler for this signal
74 if (s_signal_handler[signum] != 0) { 74 if (s_signal_handler[signum] != 0) {
75 SignalEvent sigev; 75 s_signal_handler[signum]->handleSignal(signum);
76 sigev.signum = signum;
77 s_signal_handler[signum]->handleEvent(&sigev);
78 } 76 }
79} 77}
80 78