Wait for process to be killed