-
-
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
Refactor win cwd cmdline #738
Refactor win cwd cmdline #738
Conversation
Appveyor failure: https://ci.appveyor.com/project/giampaolo/psutil/build/367/job/13xvsqt4e09p6i60
|
Move cwd extraction code from _psutil_windows.c to process_info.c so its closer to psutil_get_cmdline which accesses the process' memory in a similar way.
37fde2e
to
6f97c31
Compare
Appveyor failure seems unrelated. |
Mmmm are you sure? I don't recall ever seeing that error. |
The first error was definitely caused by my change. I made an update and now I'm only seing:
https://ci.appveyor.com/project/giampaolo/psutil/build/370/job/khsp57dfqvvbomj1#L418 |
6f97c31
to
961577a
Compare
Move the core code of psutil_get_cmdline into a separate function psutil_get_parameters that uses a returncode and an output parameter.
Move core code of psutil_get_cwd into psutil_get_parameters so the common code between psutil_get_cmdline and psutil_get_cwd can be shared.
961577a
to
2a47591
Compare
Seems ready now. |
Can you please update HISTORY.rst describing what has been fixed here? |
This isn't actually fixing anything it's just shuffling code around and consolidating. The real fix comes in #739. |
As discussed this creates a common function for Process.cwd and Process.cwdline on Windows.