Wait for exit since TerminateProcesses does not wait