#include <Signal.h>
Public Member Functions | |
| ACE_Sig_Action (void) | |
| Default constructor. Initializes everything to 0. | |
| ACE_Sig_Action (ACE_SignalHandler handler, sigset_t *sigmask=0, int flags=0) | |
| ACE_Sig_Action (ACE_SignalHandler handler, const ACE_Sig_Set &sigmask, int flags=0) | |
| ACE_Sig_Action (ACE_SignalHandler handler, int signum, sigset_t *sigmask=0, int flags=0) | |
| ACE_Sig_Action (ACE_SignalHandler handler, int signum, const ACE_Sig_Set &sigmask, int flags=0) | |
| ACE_Sig_Action (const ACE_Sig_Set &signalss, ACE_SignalHandler handler, const ACE_Sig_Set &sigmask, int flags=0) | |
| ACE_Sig_Action (const ACE_Sig_Set &signalss, ACE_SignalHandler handler, sigset_t *sigmask=0, int flags=0) | |
| ACE_Sig_Action (const ACE_Sig_Action &s) | |
| Copy constructor. | |
| ~ACE_Sig_Action (void) | |
| Default dtor. | |
| int | register_action (int signum, ACE_Sig_Action *oaction=0) |
| int | restore_action (int signum, ACE_Sig_Action &oaction) |
| int | retrieve_action (int signum) |
| Retrieve the current disposition into . | |
| void | set (struct sigaction *) |
| Set current signal action. | |
| sigaction * | get (void) |
| Get current signal action. | |
| operator struct sigaction * () | |
| void | flags (int) |
| Set current signal flags. | |
| int | flags (void) |
| Get current signal flags. | |
| void | mask (sigset_t *) |
| Set current signal mask. | |
| void | mask (ACE_Sig_Set &) |
| sigset_t * | mask (void) |
| Get current signal mask. | |
| void | handler (ACE_SignalHandler) |
| Set current signal handler (pointer to function). | |
| ACE_SignalHandler | handler (void) |
| Get current signal handler (pointer to function). | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Private Attributes | |
| sigaction | sa_ |
| Controls signal behavior. | |
Definition at line 101 of file Signal.h.
|
|
Default constructor. Initializes everything to 0.
Definition at line 118 of file Signal.cpp. References ACE_OS::sigemptyset().
00119 {
00120 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00121 this->sa_.sa_flags = 0;
00122
00123 // Since Service_Config::signal_handler_ is static and has an
00124 // ACE_Sig_Action instance, Win32 will get errno set unless this is
00125 // commented out.
00126 #if !defined (ACE_WIN32)
00127 ACE_OS::sigemptyset (&this->sa_.sa_mask);
00128 #endif /* ACE_WIN32 */
00129 this->sa_.sa_handler = 0;
00130 }
|
|
||||||||||||||||
|
Assigns the various fields of a struct but doesn't register for signal handling via the function. Definition at line 132 of file Signal.cpp. References ACE_SignalHandler, ACE_SignalHandlerV, and ACE_OS::sigemptyset().
00135 {
00136 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00137 this->sa_.sa_flags = sig_flags;
00138
00139 if (sig_mask == 0)
00140 ACE_OS::sigemptyset (&this->sa_.sa_mask);
00141 else
00142 this->sa_.sa_mask = *sig_mask; // Structure assignment...
00143
00144 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00145 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00146 #else
00147 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00148 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00149 }
|
|
||||||||||||||||
|
Assigns the various fields of a struct but doesn't register for signal handling via the function. Definition at line 151 of file Signal.cpp. References ACE_SignalHandler, ACE_SignalHandlerV, and ACE_Sig_Set::sigset().
00154 {
00155 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00156 this->sa_.sa_flags = sig_flags;
00157
00158 // Structure assignment...
00159 this->sa_.sa_mask = sig_mask.sigset ();
00160
00161 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00162 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00163 #else
00164 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00165 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00166 }
|
|
||||||||||||||||||||
|
Assigns the various fields of a struct and registers the to process signal via the function. Definition at line 168 of file Signal.cpp. References ACE_SignalHandler, ACE_SignalHandlerV, ACE_OS::sigaction(), and ACE_OS::sigemptyset().
00172 {
00173 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00174 this->sa_.sa_flags = sig_flags;
00175
00176 if (sig_mask == 0)
00177 ACE_OS::sigemptyset (&this->sa_.sa_mask);
00178 else
00179 this->sa_.sa_mask = *sig_mask; // Structure assignment...
00180
00181 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00182 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00183 #else
00184 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00185 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00186 ACE_OS::sigaction (signum, &this->sa_, 0);
00187 }
|
|
||||||||||||||||||||
|
Assigns the various fields of a struct and registers the to process signal via the function. Definition at line 189 of file Signal.cpp. References ACE_SignalHandler, ACE_SignalHandlerV, ACE_OS::sigaction(), and ACE_Sig_Set::sigset().
00193 {
00194 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00195 this->sa_.sa_flags = sig_flags;
00196
00197 // Structure assignment...
00198 this->sa_.sa_mask = sig_mask.sigset ();
00199
00200 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00201 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00202 #else
00203 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00204 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00205 ACE_OS::sigaction (signum, &this->sa_, 0);
00206 }
|
|
||||||||||||||||||||
|
Assigns the various fields of a struct and registers the to process all via the function. Definition at line 208 of file Signal.cpp. References ACE_NSIG, ACE_SignalHandler, ACE_SignalHandlerV, ACE_Sig_Set::is_member(), ACE_OS::sigaction(), and ACE_Sig_Set::sigset().
00212 {
00213 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00214 this->sa_.sa_flags = sig_flags;
00215
00216 // Structure assignment...
00217 this->sa_.sa_mask = sig_mask.sigset ();
00218
00219 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00220 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00221 #else
00222 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00223 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00224
00225 #if (ACE_NSIG > 0)
00226 for (int s = 1; s < ACE_NSIG; s++)
00227 if ((signals.is_member (s)) == 1)
00228 ACE_OS::sigaction (s, &this->sa_, 0);
00229 #else /* ACE_NSIG <= 0 */
00230 ACE_UNUSED_ARG (signals);
00231 #endif /* ACE_NSIG <= 0 */
00232 }
|
|
||||||||||||||||||||
|
Assigns the various fields of a struct and registers the to process all via the function. Definition at line 234 of file Signal.cpp. References ACE_NSIG, ACE_SignalHandler, ACE_SignalHandlerV, ACE_Sig_Set::is_member(), ACE_OS::sigaction(), and ACE_OS::sigemptyset().
00238 {
00239 // ACE_TRACE ("ACE_Sig_Action::ACE_Sig_Action");
00240 this->sa_.sa_flags = sig_flags;
00241
00242 if (sig_mask == 0)
00243 ACE_OS::sigemptyset (&this->sa_.sa_mask);
00244 else
00245 this->sa_.sa_mask = *sig_mask; // Structure assignment...
00246
00247 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00248 this->sa_.sa_handler = ACE_SignalHandlerV (sig_handler);
00249 #else
00250 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (sig_handler);
00251 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00252
00253 #if (ACE_NSIG > 0)
00254 for (int s = 1; s < ACE_NSIG; s++)
00255 if ((signals.is_member (s)) == 1)
00256 ACE_OS::sigaction (s, &this->sa_, 0);
00257 #else /* ACE_NSIG <= 0 */
00258 ACE_UNUSED_ARG (signals);
00259 #endif /* ACE_NSIG <= 0 */
00260 }
|
|
|
Copy constructor.
Definition at line 187 of file Signal.inl. References ACE_TRACE.
|
|
|
Default dtor.
Definition at line 74 of file Signal.cpp. References ACE_TRACE.
00075 {
00076 ACE_TRACE ("ACE_Sig_Action::~ACE_Sig_Action");
00077 }
|
|
|
Dump the state of an object.
Definition at line 59 of file Signal.cpp. References ACE_TRACE.
00060 {
00061 #if defined (ACE_HAS_DUMP)
00062 ACE_TRACE ("ACE_Sig_Action::dump");
00063 #endif /* ACE_HAS_DUMP */
00064 }
|
|
|
Get current signal flags.
Definition at line 96 of file Signal.inl. References ACE_TRACE.
|
|
|
Set current signal flags.
Definition at line 103 of file Signal.inl. References ACE_TRACE. Referenced by ACE_Sig_Handlers::register_handler(), and ACE_Sig_Handler::register_handler_i().
|
|
|
Get current signal action.
Definition at line 173 of file Signal.inl. References ACE_TRACE. Referenced by register_action(), and restore_action().
|
|
|
Get current signal handler (pointer to function).
Definition at line 132 of file Signal.inl. References ACE_SignalHandler, and ACE_TRACE.
00133 {
00134 ACE_TRACE ("ACE_Sig_Action::handler");
00135 return ACE_SignalHandler (this->sa_.sa_handler);
00136 }
|
|
|
Set current signal handler (pointer to function).
Definition at line 139 of file Signal.inl. References ACE_SignalHandler, ACE_SignalHandlerV, and ACE_TRACE. Referenced by ACE_Sig_Handlers::register_handler(), and ACE_Sig_Handler::register_handler_i().
00140 {
00141 ACE_TRACE ("ACE_Sig_Action::handler");
00142 #if !defined(ACE_HAS_TANDEM_SIGNALS)
00143 this->sa_.sa_handler = ACE_SignalHandlerV (handler);
00144 #else
00145 this->sa_.sa_handler = (void (*)()) ACE_SignalHandlerV (handler);
00146 #endif /* !ACE_HAS_TANDEM_SIGNALS */
00147 }
|
|
|
Get current signal mask.
Definition at line 110 of file Signal.inl. References ACE_TRACE.
|
|
|
Definition at line 125 of file Signal.inl. References ACE_TRACE, and ACE_Sig_Set::sigset().
|
|
|
Set current signal mask.
Definition at line 117 of file Signal.inl. References ACE_TRACE.
|
|
|
Definition at line 180 of file Signal.inl. References ACE_TRACE.
|
|
||||||||||||
|
Register as the current disposition and store old disposition into if it is non-NULL. Definition at line 195 of file Signal.inl. References ACE_TRACE, get(), and ACE_OS::sigaction(). Referenced by ACE_Sig_Handler::dispatch(), ACE_Sig_Adapter::handle_signal(), ACE_Sig_Handlers::register_handler(), ACE_Sig_Handler::register_handler_i(), ACE_Sig_Handlers::remove_handler(), ACE_Sig_Handler::remove_handler(), ACE_Process_Manager::wait(), and ACE_Process::wait().
00196 {
00197 ACE_TRACE ("ACE_Sig_Action::register_action");
00198 struct sigaction *sa = oaction == 0 ? 0 : oaction->get ();
00199
00200 return ACE_OS::sigaction (signum, &this->sa_, sa);
00201 }
|
|
||||||||||||
|
Assign the value of to and make it become the new signal disposition. Definition at line 211 of file Signal.inl. References ACE_TRACE, get(), and ACE_OS::sigaction().
00212 {
00213 ACE_TRACE ("ACE_Sig_Action::restore_action");
00214 this->sa_ = *oaction.get (); // Structure assignment
00215 return ACE_OS::sigaction (signum, &this->sa_, 0);
00216 }
|
|
|
Retrieve the current disposition into .
Definition at line 204 of file Signal.inl. References ACE_TRACE, and ACE_OS::sigaction(). Referenced by ACE_Sig_Handlers::register_handler().
00205 {
00206 ACE_TRACE ("ACE_Sig_Action::retrieve_action");
00207 return ACE_OS::sigaction (signum, 0, &this->sa_);
00208 }
|
|
|
Set current signal action.
Definition at line 166 of file Signal.inl. References ACE_TRACE.
|
|
|
Declare the dynamic allocation hooks.
|
|
|
Controls signal behavior.
|
1.3.6