git-svn-id: svn://db.shs.com.ru/pip@317 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-03-10 20:18:04 +00:00
parent d0842d29f6
commit 286b63e93d
2 changed files with 22 additions and 12 deletions

View File

@@ -193,9 +193,14 @@ void PIProcess::startProc(bool detached) {
void PIProcess::terminate() {
#ifdef WINDOWS
if (is_exec) if (!TerminateProcess(pi.hProcess, 0)) return; pi.dwProcessId = 0;
if (is_exec)
if (!TerminateProcess(pi.hProcess, 0))
return;
pi.dwProcessId = 0;
#else
if (is_exec) kill(pid, SIGKILL); pid = 0;
if (is_exec)
kill(pid, SIGKILL);
pid = 0;
#endif
}