#include <Signal.h>
Inheritance diagram for ACE_Sig_Adapter:
Public Member Functions | |
ACE_Sig_Adapter (ACE_Sig_Action &, int sigkey) | |
ACE_Sig_Adapter (ACE_Event_Handler *, int sigkey) | |
ACE_Sig_Adapter (ACE_Sig_Handler_Ex, int sigkey=0) | |
~ACE_Sig_Adapter (void) | |
int | sigkey (void) |
virtual int | handle_signal (int, siginfo_t *, ucontext_t *) |
Called by the to dispatch the signal handler. | |
Private Types | |
enum | { ACE_HANDLER, SIG_ACTION, C_FUNCTION } |
Is this an external handler or an ACE handler? More... | |
Private Attributes | |
int | sigkey_ |
Key for this signal handler (used to remove it). | |
enum ACE_Sig_Adapter:: { ... } | type_ |
Is this an external handler or an ACE handler? | |
ACE_Sig_Action | sa_ |
This is an external handler (ugh). | |
ACE_Event_Handler * | eh_ |
This is an ACE hander. | |
ACE_Sig_Handler_Ex | sig_func_ |
This is a normal C function. |
Definition at line 383 of file Signal.h.
|
Is this an external handler or an ACE handler?
Definition at line 403 of file Signal.h.
00404 { 00405 /// We're just wrapping an ACE_Event_Handler. 00406 ACE_HANDLER, 00407 /// An ACE_Sig_Action. 00408 SIG_ACTION, 00409 /// A normal C function. 00410 C_FUNCTION 00411 } type_; |
|
Definition at line 489 of file Signal.cpp.
|
|
Definition at line 497 of file Signal.cpp.
|
|
Definition at line 506 of file Signal.cpp. References ACE_Sig_Handler_Ex.
|
|
Definition at line 515 of file Signal.cpp.
00516 { 00517 } |
|
Called by the to dispatch the signal handler.
Reimplemented from ACE_Event_Handler. Definition at line 527 of file Signal.cpp. References ACE_HANDLER, ACE_Sig_Handler_Ex, ACE_TRACE, C_FUNCTION, ACE_Event_Handler::handle_signal(), ACE_Sig_Action::register_action(), SIG_ACTION, sig_func_, and ucontext_t.
00530 { 00531 ACE_TRACE ("ACE_Sig_Adapter::handle_signal"); 00532 00533 switch (this->type_) 00534 { 00535 case SIG_ACTION: 00536 { 00537 // We have to dispatch a handler that was registered by a 00538 // third-party library. 00539 00540 ACE_Sig_Action old_disp; 00541 00542 // Make sure this handler executes in the context it was 00543 // expecting... 00544 this->sa_.register_action (signum, &old_disp); 00545 00546 ACE_Sig_Handler_Ex sig_func = ACE_Sig_Handler_Ex (this->sa_.handler ()); 00547 00548 (*sig_func) (signum, siginfo, ucontext); 00549 // Restore the original disposition. 00550 old_disp.register_action (signum); 00551 break; 00552 } 00553 case ACE_HANDLER: 00554 this->eh_->handle_signal (signum, siginfo, ucontext); 00555 break; 00556 case C_FUNCTION: 00557 (*this->sig_func_) (signum, siginfo, ucontext); 00558 break; 00559 } 00560 return 0; 00561 } |
|
Returns this signal key that's used to remove this from the ACE_Reactor's internal table. Definition at line 520 of file Signal.cpp. References ACE_TRACE, and sigkey_. Referenced by ACE_Sig_Handlers::register_handler(), and ACE_Sig_Handlers::remove_handler().
|
|
This is an ACE hander.
|
|
This is an external handler (ugh).
|
|
This is a normal C function.
Definition at line 422 of file Signal.h. Referenced by handle_signal(). |
|
Key for this signal handler (used to remove it).
Definition at line 400 of file Signal.h. Referenced by sigkey(). |
|
Is this an external handler or an ACE handler?
|