Bug #47731 mtr freezes for many seconds when process to be killed has already gone.
The problem is that safe_kill_win fails to detect a dead process. OpenProcess() will succeed even after the process died, it will first fail after the last handle to process is closed. To fix the problem, check process status with GetExitCodeProcess() and consider process to be dead if the exit code returned by this routine is not STILL_ALIVE.
Showing
Please register or sign in to comment