mirror of
https://github.com/oxen-io/lokinet-control-panel.git
synced 2023-12-14 05:53:00 +01:00
blocking call to service manager on windows
This commit is contained in:
parent
e933c71c90
commit
338c291cb6
|
@ -21,16 +21,14 @@ WindowsLokinetProcessManager::WindowsLokinetProcessManager()
|
|||
bool WindowsLokinetProcessManager::doStartLokinetProcess()
|
||||
{
|
||||
// try searching one level up from CWD
|
||||
bool success = QProcess::startDetached(path, {"start", "lokinet"});
|
||||
if (!success)
|
||||
qDebug("QProcess::startDetached() failed");
|
||||
const bool success = QProcess::execute(path, {"start", "lokinet"}) == 0;
|
||||
int pid = -1;
|
||||
return success and doGetProcessPid(pid) and pid != -1;
|
||||
}
|
||||
|
||||
bool WindowsLokinetProcessManager::doStopLokinetProcess()
|
||||
{
|
||||
return QProcess::startDetached(path, {"stop", "lokinet"});
|
||||
return QProcess::execute(path, {"stop", "lokinet"}) == 0;
|
||||
}
|
||||
|
||||
bool WindowsLokinetProcessManager::doForciblyStopLokinetProcess()
|
||||
|
|
Loading…
Reference in a new issue