Our previous implementation of ProcessWatchdog was susceptible to a well-known issue of GetProcessExitCode: if the process' real exit code is STILL_ALIVE, then there's no way to determine that it has exited, because this number is equal to a special value that function returns for a living process.
This new implementation fixes that, and also introduces a new, better API to pass more arguments (mostly for the purpose of testing).
Our previous implementation of ProcessWatchdog was susceptible to a well-known issue of
GetProcessExitCode
: if the process' real exit code isSTILL_ALIVE
, then there's no way to determine that it has exited, because this number is equal to a special value that function returns for a living process.This new implementation fixes that, and also introduces a new, better API to pass more arguments (mostly for the purpose of testing).