[Python-checkins] python/dist/src/PC/bdist_wininst install.c, 1.10.4.2, 1.10.4.3

theller at users.sourceforge.net theller at users.sourceforge.net
Wed Dec 22 17:49:21 CET 2004


Update of /cvsroot/python/python/dist/src/PC/bdist_wininst
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7572

Modified Files:
      Tag: release24-maint
	install.c 
Log Message:
Close stdout and stderr, which are redirected into a temp file, before
trying to remove this file - the file was never removed before.

Fixes [ 1067732 ] wininst --install-script leaves residual files


Index: install.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/bdist_wininst/install.c,v
retrieving revision 1.10.4.2
retrieving revision 1.10.4.3
diff -u -d -r1.10.4.2 -r1.10.4.3
--- install.c	22 Dec 2004 16:40:30 -0000	1.10.4.2
+++ install.c	22 Dec 2004 16:49:05 -0000	1.10.4.3
@@ -760,7 +760,9 @@
 	rc = do_run_simple_script(hPython, script);
 	FreeLibrary(hPython);
 	fflush(stderr);
+	fclose(stderr);
 	fflush(stdout);
+	fclose(stdout);
 	/* We only care about the output when we fail.  If the script works
 	   OK, then we discard it
 	*/
@@ -1951,7 +1953,9 @@
 				fprintf(stderr, "*** Could not load Python ***");
 			}
 			fflush(stderr);
+			fclose(stderr);
 			fflush(stdout);
+			fclose(stdout);
 	    
 			fp = fopen(tempname, "rb");
 			n = fread(buffer, 1, sizeof(buffer), fp);
@@ -2299,7 +2303,9 @@
 		}
 	
 		fflush(stderr);
+		fclose(stderr);
 		fflush(stdout);
+		fclose(stdout);
 	
 		fp = fopen(tempname, "rb");
 		n = fread(buffer, 1, sizeof(buffer), fp);



More information about the Python-checkins mailing list