Wait for process to be completely dead