Merge pull request #2371 from bmiklautz/terminate_process

winpr/process: handle PIDs <= 0 in TerminateProcess
This commit is contained in:
Norbert Federa 2015-02-10 14:57:57 +01:00
commit 30716c182d

View File

@ -448,7 +448,7 @@ BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode)
process = (WINPR_PROCESS*) hProcess;
if (!process)
if (!process || (process->pid <= 0))
return FALSE;
if (kill(process->pid, SIGTERM))