summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-11-22 00:10:33 +0800
committerGiampaolo Rodola <g.rodola@gmail.com>2019-11-22 00:10:33 +0800
commitd739cbb1a5b207212d467b219dfc25b017911530 (patch)
treea2d9fe775be83bd4f58f559006d4e9092197978b
parentf7e898b0987f97352c7551bdd9b29b594e1236f6 (diff)
downloadpsutil-d739cbb1a5b207212d467b219dfc25b017911530.tar.gz
use PROCESS_QUERY_LIMITED_INFORMATION
-rw-r--r--psutil/arch/windows/process_info.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/psutil/arch/windows/process_info.c b/psutil/arch/windows/process_info.c
index 62735728..5ea5f765 100644
--- a/psutil/arch/windows/process_info.c
+++ b/psutil/arch/windows/process_info.c
@@ -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".