add isRunning method

This commit is contained in:
luddens 2019-06-24 13:49:45 +02:00 committed by Matthieu Gautier
parent cfdd634c3c
commit 87f5b56b72
2 changed files with 9 additions and 0 deletions

View File

@ -14,6 +14,7 @@ class KiwixServe
void run();
void shutDown();
bool isRunning();
private:
std::unique_ptr<Subprocess> mp_kiwixServe;

View File

@ -58,4 +58,12 @@ void KiwixServe::shutDown()
mp_kiwixServe->kill();
}
bool KiwixServe::isRunning()
{
if (mp_kiwixServe) {
return (mp_kiwixServe->isRunning());
}
return false;
}
}