update to don't wait until timeout if the process is already exited