[Python-checkins] r50981 - python/branches/release24-maint/Tools/buildbot/kill_python.c

martin.v.loewis python-checkins at python.org
Sun Jul 30 15:34:47 CEST 2006


Author: martin.v.loewis
Date: Sun Jul 30 15:34:47 2006
New Revision: 50981

Modified:
   python/branches/release24-maint/Tools/buildbot/kill_python.c
Log:
Backport r50856:
Don't kill a normal instance of python running on windows when checking
to kill a cygwin instance.  build\\python.exe was matching a normal
windows instance.  Prefix that with a \\ to ensure build is a directory 
and not PCbuild.  As discussed on python-dev.


Modified: python/branches/release24-maint/Tools/buildbot/kill_python.c
==============================================================================
--- python/branches/release24-maint/Tools/buildbot/kill_python.c	(original)
+++ python/branches/release24-maint/Tools/buildbot/kill_python.c	Sun Jul 30 15:34:47 2006
@@ -42,8 +42,19 @@
 
 		_strlwr(path);
 		/* printf("%s\n", path); */
+
+		/* Check if we are running a buildbot version of Python.
+
+		   On Windows, this will always be a debug build from the
+		   PCbuild directory.  build\\PCbuild\\python_d.exe
+		   
+		   On Cygwin, the pathname is similar to other Unixes.
+		   Use \\build\\python.exe to ensure we don't match
+		   PCbuild\\python.exe which could be a normal instance
+		   of Python running on vanilla Windows.
+		*/
 		if ((strstr(path, "build\\pcbuild\\python_d.exe") != NULL) ||
-		    (strstr(path, "build\\python.exe") != NULL)) {
+		    (strstr(path, "\\build\\python.exe") != NULL)) {
 			printf("Terminating %s (pid %d)\n", path, pids[i]);
 			if (!TerminateProcess(hProcess, 1)) {
 				printf("Termination failed: %d\n", GetLastError());


More information about the Python-checkins mailing list