mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-02-18 15:20:22 -05:00
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:
@@ -14,6 +14,7 @@ class KiwixServe
|
||||
|
||||
void run();
|
||||
void shutDown();
|
||||
bool isRunning();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Subprocess> mp_kiwixServe;
|
||||
|
||||
@@ -58,4 +58,12 @@ void KiwixServe::shutDown()
|
||||
mp_kiwixServe->kill();
|
||||
}
|
||||
|
||||
bool KiwixServe::isRunning()
|
||||
{
|
||||
if (mp_kiwixServe) {
|
||||
return (mp_kiwixServe->isRunning());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user