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

Process not filled on i686-pc-windows-msvc #1188

Closed
picrap opened this issue Dec 29, 2023 · 2 comments · Fixed by #1189
Closed

Process not filled on i686-pc-windows-msvc #1188

picrap opened this issue Dec 29, 2023 · 2 comments · Fixed by #1189

Comments

@picrap
Copy link
Contributor

picrap commented Dec 29, 2023

Hi,

Using sysinfo 0.30.0 and building for i686-pc-windows-msvc, the Process members are not all filled. All of this works fine with default target.
My best guess is that it comes from a 32/64 bits problem.

let mut system = System::new_all();
system.refresh_processes();
for (pid, process) in system.processes().iter() {
      if let Some(cwd) = process.cwd() {
        println!("cwd={}", cwd);
    } else {
        println!("nope");
    }
}

As far as I know, I noticed this for the following members:

  • cwd (None)
  • cmd (empy)
  • environ (empy)
  • root (None)
@GuillaumeGomez
Copy link
Owner

I don't have this arch so you'll need to fix it (or someone else who has this arch). ^^'

@picrap
Copy link
Contributor Author

picrap commented Dec 30, 2023

We have a hard limit: a 32-bits process can not read memory from 64-bits processes (for very obvious reasons 😉). However it may work in full 32-bits environments (I’ll setup a virtual machine at work next week instead of testing in WOW64). If it works, I’ll simply remove the code exiting the get_process_params function on non 64-bits platforms, and that will be good enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants