summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-27 03:51:58 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-27 03:51:58 (GMT)
commite4abc232d54b1361120de0393f9f0447188b1639 (patch)
tree3c0ce64408ac62de164443dd47b87274ba4cafd7 /Tools
parentbc24eee333126a313bfe42381050a49ecbbc8bbe (diff)
downloadcpython-e4abc232d54b1361120de0393f9f0447188b1639.zip
cpython-e4abc232d54b1361120de0393f9f0447188b1639.tar.gz
cpython-e4abc232d54b1361120de0393f9f0447188b1639.tar.bz2
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.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/buildbot/kill_python.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/Tools/buildbot/kill_python.c b/Tools/buildbot/kill_python.c
index ca905f5..023ff2d 100644
--- a/Tools/buildbot/kill_python.c
+++ b/Tools/buildbot/kill_python.c
@@ -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());