diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 0035c85e..286c6ed3 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -339,9 +339,10 @@ class SysCommandWorker: except OSError as error: self.ended = time.time() self.exit_code = os.waitpid(self.pid, 0)[1] + os.close(self.child_fd) break - if pid_exists(self.pid) is False: + if pid_exists(self.pid) is False and self.exit_code is None: self.ended = time.time() try: self.exit_code = os.waitpid(self.pid, 0)[1]