-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cmdline() can now throw OSError instead of AccessDenied #1443
Comments
So, the difference in behavior between 5.5.0 and 5.5.1 is correct. Practically speaking it's good that you get As for the original change (#1398) I refactored that part of the code which now calls the 2 distinct methods from Python (instead of C) but it currently does not make any distinction about the Windows version against which the second method (no PEB) is tried: Line 738 in 32c1a0d
At this proposal I want to CC @EccoTheFlintstone and ask: in Python, should we avoid calling the use_peb=False method if Windows < 8.1? What happens if we do?I know you already answered me this question but I kind of forgot. =) |
Wait, sorry, I listed those the wrong way around. 5.5.0 has the right behaviour - throws AccessDenied - and 5.5.1 has the wrong behaviour - throws OSError. One of my scripts broke when I upgraded, because I was throwing away AccessDenied, but that no longer works with 5.5.1. |
Do you have Visual Studio installed? Could you try current GIT master version? |
I do! Compiling was surprisingly painless. And it looks like the problem doesn't exist on master:
|
Beautiful. Reopening as per my question to @EccoTheFlintstone. |
At this proposal I want to CC @EccoTheFlintstone and ask: in Python, should we avoid calling the use_peb=False method if Windows < 8.1? What happens if we do? I think the kernel will return an error code stating that the class 60 ( I did a check on the windows version (being >= 8.1) before calling this to avoid this case (and calling |
This was solved as part of #1446. Closing and releasing a new version very soon (kind of high priority). |
When trying to get the cmdline() of a process without sufficient permissions on Windows, since 5.5.1, it raises OSError instead of psutil.AccessDenied.
Behaviour with 5.5.0:
Behaviour with 5.5.1:
This is probably a direct result of #1398
The text was updated successfully, but these errors were encountered: