mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Port cygwin kill_python changes from 2.4 branch.
This commit is contained in:
parent
90e27d38f5
commit
787fe6d9f6
2 changed files with 8 additions and 1 deletions
6
Tools/buildbot/Makefile
Normal file
6
Tools/buildbot/Makefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
all: kill_python.exe
|
||||||
|
./kill_python.exe
|
||||||
|
|
||||||
|
kill_python.exe: kill_python.c
|
||||||
|
gcc -o kill_python.exe kill_python.c -lpsapi
|
||||||
|
|
|
@ -42,7 +42,8 @@ int main()
|
||||||
|
|
||||||
_strlwr(path);
|
_strlwr(path);
|
||||||
/* printf("%s\n", path); */
|
/* printf("%s\n", path); */
|
||||||
if (strstr(path, "build\\pcbuild\\python_d.exe") != NULL) {
|
if ((strstr(path, "build\\pcbuild\\python_d.exe") != NULL) ||
|
||||||
|
(strstr(path, "build\\python.exe") != NULL)) {
|
||||||
printf("Terminating %s (pid %d)\n", path, pids[i]);
|
printf("Terminating %s (pid %d)\n", path, pids[i]);
|
||||||
if (!TerminateProcess(hProcess, 1)) {
|
if (!TerminateProcess(hProcess, 1)) {
|
||||||
printf("Termination failed: %d\n", GetLastError());
|
printf("Termination failed: %d\n", GetLastError());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue