Merge pull request #2371 from bmiklautz/terminate_process
winpr/process: handle PIDs <= 0 in TerminateProcess
This commit is contained in:
commit
30716c182d
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user