diff options
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 9730fa7..216f095 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -1436,6 +1436,10 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss, PMEMORY_WORKING_SET_LIST p; SIZE_T n = 0x4000, length; + /* This appears to work despite MSDN claiming that QueryWorkingSSet requires + PROCESS_QUERY_INFORMATION *and* PROCESS_VM_READ. Since we're trying to do + everything with least perms, we stick to PROCESS_QUERY_INFORMATION only + unless this changes in Windows for some reason. */ hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, dwProcessId); if (hProcess == NULL) { |