Use minimal required process access mask in wxMSW wxKill().
We don't need PROCESS_TERMINATE permission if we are not going to call TerminateProcess() for it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -708,11 +708,11 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags)
|
||||
wxKillAllChildren(pid, sig, krc);
|
||||
|
||||
// get the process handle to operate on
|
||||
HANDLE hProcess = ::OpenProcess(SYNCHRONIZE |
|
||||
PROCESS_TERMINATE |
|
||||
PROCESS_QUERY_INFORMATION,
|
||||
FALSE, // not inheritable
|
||||
(DWORD)pid);
|
||||
DWORD dwAccess = PROCESS_QUERY_INFORMATION | SYNCHRONIZE;
|
||||
if ( sig == wxSIGKILL )
|
||||
dwAccess |= PROCESS_TERMINATE;
|
||||
|
||||
HANDLE hProcess = ::OpenProcess(dwAccess, FALSE, (DWORD)pid);
|
||||
if ( hProcess == NULL )
|
||||
{
|
||||
if ( krc )
|
||||
|
Reference in New Issue
Block a user