mirror of https://github.com/kiwix/libkiwix.git
Merge pull request #233 from kiwix/kiwix-serve-is-running
add isRunning method to check if the local server is running
This commit is contained in:
commit
e740a511c6
|
@ -14,6 +14,7 @@ class KiwixServe
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
void shutDown();
|
void shutDown();
|
||||||
|
bool isRunning();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Subprocess> mp_kiwixServe;
|
std::unique_ptr<Subprocess> mp_kiwixServe;
|
||||||
|
|
|
@ -58,4 +58,12 @@ void KiwixServe::shutDown()
|
||||||
mp_kiwixServe->kill();
|
mp_kiwixServe->kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool KiwixServe::isRunning()
|
||||||
|
{
|
||||||
|
if (mp_kiwixServe) {
|
||||||
|
return (mp_kiwixServe->isRunning());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue