#include <Safir/Utilities/ProcessMonitor.h>
Safir::Utilities::ProcessMonitor::ProcessMonitor |
( |
| ) |
|
Safir::Utilities::ProcessMonitor::~ProcessMonitor |
( |
| ) |
|
void Safir::Utilities::ProcessMonitor::Init |
( |
const OnTerminateCb & |
callback | ) |
|
Init the ProcessMonitor.
This method must be called first thing and before any call to StartMonitorPid or StopMonitorPid.
- Parameters
-
[in] | callback | The function to be called when a monitored process exists. Note that this function is executed in ProcessMonitor's own thread. |
void Safir::Utilities::ProcessMonitor::StartMonitorPid |
( |
const pid_t |
pid | ) |
|
Start monitor the given PID.
- Parameters
-
[in] | pid | The PID which we want to monitor. |
void Safir::Utilities::ProcessMonitor::StopMonitorPid |
( |
const pid_t |
pid | ) |
|
Stop monitor the given PID.
- Parameters
-
[in] | pid | The PID which we want to stop monitor. |