MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / waitForProcess

Function waitForProcess

src/processrunner.cpp:427–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427ProcessRunner::Results waitForProcess(HANDLE initialProcess, LPDWORD exitCode,
428 UILocker::Session* ls)
429{
430 std::vector<HANDLE> processes = {initialProcess};
431
432 const auto r = waitForProcesses(processes, ls);
433
434 // as long as it's not running anymore, try to get the exit code
435 if (exitCode && r != ProcessRunner::Running) {
436 if (!::GetExitCodeProcess(initialProcess, exitCode)) {
437 const auto e = ::GetLastError();
438 log::warn("failed to get exit code of process, {}", formatSystemMessage(e));
439 }
440 }
441
442 return r;
443}
444
445ProcessRunner::ProcessRunner(OrganizerCore& core, IUserInterface* ui)
446 : m_core(core), m_ui(ui), m_lockReason(UILocker::NoReason), m_waitFlags(NoFlags),

Callers 1

postRunMethod · 0.85

Calls 1

waitForProcessesFunction · 0.85

Tested by

no test coverage detected