43 if (signalledPid <= 0)
50 ARMARX_WARNING_S <<
"Application " << application->getName() <<
" (pid " << signalledPid
52 <<
" ms. Giving up waiting for it; you may have to kill it manually.";
58 if (application->compareAndResetPid(signalledPid))
void awaitTermination(const Data_Structure::ApplicationInstancePtr &application, int signalledPid)
Waits until the process that was signalled has terminated, then clears the application's pid.
ApplicationStopperPtr stopper
static constexpr std::chrono::milliseconds TerminationTimeout
How long to wait for a signalled process to actually disappear before giving up.
StopStrategy(ApplicationStopperPtr stopper)
void savePid(Data_Structure::ApplicationInstancePtr app)
#define ARMARX_WARNING_S
The logging level for unexpected behaviour, but not a serious problem.
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
bool WaitForExit(int pid, std::chrono::milliseconds timeout, std::chrono::milliseconds pollInterval)
Blocks until the process with the given pid has disappeared, at most for timeout.
std::shared_ptr< ApplicationStopper > ApplicationStopperPtr