Skip to content

Commit d739cbb

Browse files
committed
use PROCESS_QUERY_LIMITED_INFORMATION
1 parent f7e898b commit d739cbb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

psutil/arch/windows/process_info.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ psutil_pid_is_running(DWORD pid) {
345345
return 1;
346346
if (pid < 0)
347347
return 0;
348-
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
349-
FALSE, pid);
348+
hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
350349
if (NULL == hProcess) {
351350
err = GetLastError();
352351
// Yeah, this is the actual error code in case of "no such process".

0 commit comments

Comments
 (0)