just kill python instead of trying to shut it down gracefully, in tests
This commit is contained in:
parent
a577dac775
commit
f8261494e0
|
@ -388,15 +388,11 @@ void stop_all_proxies()
|
|||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE proc = OpenProcess(PROCESS_TERMINATE | SYNCHRONIZE, FALSE, i->second.pid);
|
||||
GenerateConsoleCtrlEvent(CTRL_C_EVENT, i->second.pid);
|
||||
int ret = WaitForSingleObject(proc, 1000);
|
||||
// if the process didn't terminate in 1 second, kill it
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
TerminateProcess(proc, 138);
|
||||
TerminateProcess(proc, 138);
|
||||
CloseHandle(proc);
|
||||
#else
|
||||
printf("killing pid: %d\n", i->second.pid);
|
||||
kill(i->second.pid, SIGINT);
|
||||
kill(i->second.pid, SIGKILL);
|
||||
#endif
|
||||
running_proxies.erase(i->second.pid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue