]> granicus.if.org Git - python/commitdiff
Don't kill a normal instance of python running on windows when checking
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 27 Jul 2006 03:51:58 +0000 (03:51 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 27 Jul 2006 03:51:58 +0000 (03:51 +0000)
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.

Tools/buildbot/kill_python.c

index ca905f5713997d422a0406d95a11caf6eea455c9..023ff2deffca401ba723810c6c59534cac18efb4 100644 (file)
@@ -42,8 +42,19 @@ int main()
 
                _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());