We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7e898b commit d739cbbCopy full SHA for d739cbb
psutil/arch/windows/process_info.c
@@ -345,8 +345,7 @@ psutil_pid_is_running(DWORD pid) {
345
return 1;
346
if (pid < 0)
347
return 0;
348
- hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
349
- FALSE, pid);
+ hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
350
if (NULL == hProcess) {
351
err = GetLastError();
352
// Yeah, this is the actual error code in case of "no such process".
0 commit comments