##// END OF EJS Templates
procutil: avoid an uninitialized variable usage on tempfile exception...
Matt Harbison -
r49319:f8540fe4 default
parent child Browse files
Show More
@@ -742,6 +742,8 b' else:'
742 start_new_session = False
742 start_new_session = False
743 ensurestart = True
743 ensurestart = True
744
744
745 stdin = None
746
745 try:
747 try:
746 if stdin_bytes is None:
748 if stdin_bytes is None:
747 stdin = subprocess.DEVNULL
749 stdin = subprocess.DEVNULL
@@ -770,7 +772,7 b' else:'
770 record_wait(255)
772 record_wait(255)
771 raise
773 raise
772 finally:
774 finally:
773 if stdin_bytes is not None:
775 if stdin_bytes is not None and stdin is not None:
774 assert not isinstance(stdin, int)
776 assert not isinstance(stdin, int)
775 stdin.close()
777 stdin.close()
776 if not ensurestart:
778 if not ensurestart:
@@ -852,6 +854,8 b' else:'
852 return
854 return
853
855
854 returncode = 255
856 returncode = 255
857 stdin = None
858
855 try:
859 try:
856 if record_wait is None:
860 if record_wait is None:
857 # Start a new session
861 # Start a new session
@@ -894,7 +898,8 b' else:'
894 finally:
898 finally:
895 # mission accomplished, this child needs to exit and not
899 # mission accomplished, this child needs to exit and not
896 # continue the hg process here.
900 # continue the hg process here.
897 stdin.close()
901 if stdin is not None:
902 stdin.close()
898 if record_wait is None:
903 if record_wait is None:
899 os._exit(returncode)
904 os._exit(returncode)
900
905
General Comments 0
You need to be logged in to leave comments. Login now