|
libassa 3.5.0
|
Class SIGCHLDHandler handles SIGCHLD signal. More...
#include <Handlers.h>
Public Member Functions | |
| SIGCHLDHandler () | |
| Constructor. | |
| int | handle_signal (int signum_) |
| Receive CHLD signal. | |
| sig_atomic_t | child_exited () |
| Did child exit? | |
| void | resetState () |
| Reset child's exit state. | |
Private Attributes | |
| sig_atomic_t | m_child_exit_flag |
| Child exit's state. | |
Class SIGCHLDHandler handles SIGCHLD signal.
Definition at line 187 of file Handlers.h.
| ASSA::SIGCHLDHandler::SIGCHLDHandler | ( | ) | [inline] |
Constructor.
Definition at line 191 of file Handlers.h.
References ASSA::SIGHAND, and trace_with_mask.
: m_child_exit_flag(0) { trace_with_mask("SIGCHLDHandler::SIGCHLDHandler", SIGHAND); }
| sig_atomic_t ASSA::SIGCHLDHandler::child_exited | ( | ) | [inline] |
Did child exit?
Definition at line 208 of file Handlers.h.
References m_child_exit_flag.
{ return m_child_exit_flag; }
| int ASSA::SIGCHLDHandler::handle_signal | ( | int | signum_ | ) | [inline, virtual] |
Receive CHLD signal.
Reimplemented from ASSA::EventHandler.
Definition at line 197 of file Handlers.h.
References m_child_exit_flag, ASSA::SIGHAND, and trace_with_mask.
{
trace_with_mask("SIGCHLDHandler::handle_signal", SIGHAND);
if (signum_ == SIGCHLD && wait(NULL) != -1) {
m_child_exit_flag = 1;
return 0;
}
return -1;
}
| void ASSA::SIGCHLDHandler::resetState | ( | void | ) | [inline, virtual] |
Reset child's exit state.
Reimplemented from ASSA::EventHandler.
Definition at line 212 of file Handlers.h.
References m_child_exit_flag.
{ m_child_exit_flag = 0; }
sig_atomic_t ASSA::SIGCHLDHandler::m_child_exit_flag [private] |
Child exit's state.
Definition at line 216 of file Handlers.h.
Referenced by child_exited(), handle_signal(), and resetState().
1.7.3