TerminateProcess() is "equivalent" to kill(), while WaitForSingleObject() is "equivalent" to waitpid(), so the handle must be closed after WaitForSingleObject().
TerminateProcess() is "equivalent" to kill(), while WaitForSingleObject() is "equivalent" to waitpid(), so the handle must be closed after WaitForSingleObject().