Skip to content

Commit

Permalink
use PROCESS_QUERY_LIMITED_INFORMATION
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Nov 21, 2019
1 parent f7e898b commit d739cbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions psutil/arch/windows/process_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ psutil_pid_is_running(DWORD pid) {
return 1;
if (pid < 0)
return 0;
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
FALSE, pid);
hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
if (NULL == hProcess) {
err = GetLastError();
// Yeah, this is the actual error code in case of "no such process".
Expand Down

0 comments on commit d739cbb

Please sign in to comment.