Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenProcess fails with PROCESS_QUERY_LIMITED_INFORMATION on Windows XP #714

Closed
Lomanic opened this issue Jul 7, 2019 · 0 comments · Fixed by #1045
Closed

OpenProcess fails with PROCESS_QUERY_LIMITED_INFORMATION on Windows XP #714

Lomanic opened this issue Jul 7, 2019 · 0 comments · Fixed by #1045

Comments

@Lomanic
Copy link
Collaborator

Lomanic commented Jul 7, 2019

Creating this issue to reference this behavior on Windows XP, quoting myself from #713 (comment)

Regarding WinXP, this is failing because of PROCESS_QUERY_LIMITED_INFORMATION being introduced in Vista. Calling windows.OpenProcess with windows.PROCESS_QUERY_INFORMATION works properly on WinXP (hinting that every calls to OpenProcess with PROCESS_QUERY_LIMITED_INFORMATION in gopsutil fail on WinXP). Handling this (opening process with right parameter according to Windows version) would complicate a little bit the code in process_window.go (while being prudent not too slow down gopsutil functions), I'm not sure if we should bother so much about WinXP now that it's deprecated for quite a few years.

I think it would be nice to keep compatibility with WinXP, but with a low priority (we didn't even have report from users that these calls to OpenProcess are broken on XP), I will probably implement something in the future if nobody else does.

Lomanic added a commit to Lomanic/gopsutil that referenced this issue Mar 6, 2021
shirou added a commit that referenced this issue Mar 7, 2021
[process][windows] Fix #714 call OpenProcess with PROCESS_QUERY_INFORMATION on WinXP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant