wait for windows to terminate a non-responsive app