MCPcopy Create free account
hub / github.com/arvidn/libtorrent / stop_process

Function stop_process

test/setup_transfer.cpp:605–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605void stop_process(pid_type p)
606{
607#ifdef _WIN32
608 HANDLE proc = OpenProcess(PROCESS_TERMINATE | SYNCHRONIZE, FALSE, p);
609 if (proc == nullptr) return;
610 TerminateProcess(proc, 138);
611 WaitForSingleObject(proc, 5000);
612 CloseHandle(proc);
613#else
614 std::printf("killing pid: %d\n", p);
615 kill(p, SIGKILL);
616#endif
617}
618
619} // anonymous namespace
620

Callers 3

stop_proxyFunction · 0.85
stop_all_proxiesFunction · 0.85
stop_web_serverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected