mirror of https://github.com/python/cpython
Port cygwin kill_python changes from 2.4 branch.
This commit is contained in:
parent
90e27d38f5
commit
787fe6d9f6
|
@ -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);
|
||||
/* 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]);
|
||||
if (!TerminateProcess(hProcess, 1)) {
|
||||
printf("Termination failed: %d\n", GetLastError());
|
||||
|
|
Loading…
Reference in New Issue