mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 05:31:29 +00:00
Don't fail if the game process went away before we were ready to wait for it.
This commit is contained in:
parent
b5c54ec019
commit
cd4aa2d9a9
1 changed files with 6 additions and 1 deletions
|
@ -189,7 +189,12 @@ static void windowsWaitForProcessToDie(const DWORD pid)
|
|||
infof("Waiting on process ID #%u", (unsigned int) pid);
|
||||
h = OpenProcess(SYNCHRONIZE, FALSE, pid);
|
||||
if (!h) {
|
||||
// !!! FIXME: what does this return if process is already dead?
|
||||
const DWORD err = GetLastError();
|
||||
if (err == ERROR_INVALID_PARAMETER) {
|
||||
info("No such process; probably already dead. Carry on.");
|
||||
return; /* process is (probably) already gone. */
|
||||
}
|
||||
infof("OpenProcess failed. err=%d", (unsigned int) err);
|
||||
die("OpenProcess failed");
|
||||
}
|
||||
if (WaitForSingleObject(h, INFINITE) != WAIT_OBJECT_0) {
|
||||
|
|
Loading…
Reference in a new issue