#include <sue_wait.hpp>
Public Methods | |
SUEChildHandler (pid_t a_pid, SUEChildWaitAgent *a_agent) | |
Constructor. | |
virtual | ~SUEChildHandler () |
Destructor. | |
virtual void | ChildHandle () |
Handling method. | |
Protected Methods | |
pid_t | GetPid () const |
bool | IfExited () const |
Did the process exit? | |
int | ExitCode () const |
What was the process' exit code? | |
bool | IfSignaled () const |
What was the process killed with a signal? | |
int | TermSig () const |
What was the process' termination signal? |
This class allows to handle the event 'particular child process finished'. You need to create a derived class with the ChildHandle() method overriden to implement your custom handling. You also can use SUEChildHandle as is if you only need to get rid of zombies and no special hanling is required.
|
Constructor.
|
|
Destructor.
|
|
Handling method. Override this in your derived class to implement your custom functionality. Use GetPid(), IfExited(), ExitCode() and IfSignaled() methods to analyse the situation.
|
|
What was the process' exit code? Only useful from within ChildHandle(), and only if IfExited() returns true.
|
|
|
|
Did the process exit? Only useful from within ChildHandle()
|
|
What was the process killed with a signal? Only useful from within ChildHandle() |
|
What was the process' termination signal? Only useful from within ChildHandle(), and only if IfSignaled() returns true. |