diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2009-09-30 19:02:24 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-09-30 19:02:24 (GMT) |
commit | 884db973bb7d11252581e7bc10ce172892986b67 (patch) | |
tree | 1888ba4418451c784af232d4526aab0cee3e4e74 /src/FbTk/SignalHandler.cc | |
parent | 4663a9591e08b554f82366cdd8e9075b0a6fbe55 (diff) | |
download | fluxbox-884db973bb7d11252581e7bc10ce172892986b67.zip fluxbox-884db973bb7d11252581e7bc10ce172892986b67.tar.bz2 |
cosmetic fixes: removed redundant ';' + some whitespaces
Diffstat (limited to 'src/FbTk/SignalHandler.cc')
-rw-r--r-- | src/FbTk/SignalHandler.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/FbTk/SignalHandler.cc b/src/FbTk/SignalHandler.cc index ea0f86f..a0a4c4c 100644 --- a/src/FbTk/SignalHandler.cc +++ b/src/FbTk/SignalHandler.cc | |||
@@ -36,7 +36,7 @@ SignalHandler &SignalHandler::instance() { | |||
36 | return singleton; | 36 | return singleton; |
37 | } | 37 | } |
38 | 38 | ||
39 | bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, | 39 | bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, |
40 | SignalEventHandler **oldhandler_ret) { | 40 | SignalEventHandler **oldhandler_ret) { |
41 | // must be less than NSIG | 41 | // must be less than NSIG |
42 | if (signum >= NSIG) | 42 | if (signum >= NSIG) |
@@ -45,18 +45,18 @@ bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, | |||
45 | // get old signal handler for this signum | 45 | // get old signal handler for this signum |
46 | if (oldhandler_ret != 0) | 46 | if (oldhandler_ret != 0) |
47 | *oldhandler_ret = s_signal_handler[signum]; | 47 | *oldhandler_ret = s_signal_handler[signum]; |
48 | 48 | ||
49 | struct sigaction sa; | 49 | struct sigaction sa; |
50 | // set callback | 50 | // set callback |
51 | sa.sa_handler = SignalHandler::handleSignal; | 51 | sa.sa_handler = SignalHandler::handleSignal; |
52 | sigemptyset (&sa.sa_mask); | 52 | sigemptyset (&sa.sa_mask); |
53 | sa.sa_flags = 0; | 53 | sa.sa_flags = 0; |
54 | 54 | ||
55 | if (sigaction(signum, &sa, 0) == -1) | 55 | if (sigaction(signum, &sa, 0) == -1) |
56 | return false; | 56 | return false; |
57 | 57 | ||
58 | s_signal_handler[signum] = eh; | 58 | s_signal_handler[signum] = eh; |
59 | 59 | ||
60 | return true; | 60 | return true; |
61 | } | 61 | } |
62 | 62 | ||
@@ -69,4 +69,5 @@ void SignalHandler::handleSignal(int signum) { | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||
72 | }; | 72 | } |
73 | |||