summaryrefslogtreecommitdiff
path: root/ACE/ace/Sig_Handler.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2009-03-23 23:14:02 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2009-03-23 23:14:02 +0000
commit2c8fee233a4ac700e3e41f2ec581bc41bc6d7135 (patch)
tree75344987de802469ca5c2f623f9bcea4a0a18ec7 /ACE/ace/Sig_Handler.cpp
parent52a51c3690a4c0f28ac483cc1b193c139f3168f8 (diff)
downloadATCD-2c8fee233a4ac700e3e41f2ec581bc41bc6d7135.tar.gz
ChangeLogTag:Mon
Diffstat (limited to 'ACE/ace/Sig_Handler.cpp')
-rw-r--r--ACE/ace/Sig_Handler.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/ACE/ace/Sig_Handler.cpp b/ACE/ace/Sig_Handler.cpp
index df340ba1b1d..484a0930ee2 100644
--- a/ACE/ace/Sig_Handler.cpp
+++ b/ACE/ace/Sig_Handler.cpp
@@ -400,7 +400,10 @@ ACE_Sig_Handlers::register_handler (int signum,
// Add the ACE signal handler to the set of handlers for this
// signal (make sure it goes before the external one if there is
// one of these).
- if (ACE_Sig_Handlers_Set::instance (signum)->insert (ace_sig_adapter) == -1)
+
+ int result = ACE_Sig_Handlers_Set::instance (signum)->insert (ace_sig_adapter);
+
+ if (result == -1)
{
// We couldn't reinstall our handler, so let's pretend like
// none of this happened...
@@ -483,7 +486,7 @@ ACE_Sig_Handlers::remove_handler (int signum,
for (ACE_Event_Handler **eh;
handler_iterator.next (eh) != 0;
- handler_iterator.advance ())
+ )
{
// Type-safe downcast would be nice here...
ACE_Sig_Adapter *sh = (ACE_Sig_Adapter *) *eh;
@@ -551,14 +554,12 @@ ACE_Sig_Handlers::dispatch (int signum,
for (ACE_Event_Handler **eh = 0;
handler_iterator.next (eh) != 0;
- handler_iterator.advance ())
- {
- if ((*eh)->handle_signal (signum, siginfo, ucontext) == -1)
- {
- handler_set->remove (*eh);
- delete *eh;
- }
- }
+ )
+ if ((*eh)->handle_signal (signum, siginfo, ucontext) == -1)
+ {
+ handler_set->remove (*eh);
+ delete *eh;
+ }
}
// Return the first item in the list of handlers. Note that this will