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

System refresh_all does not remove dead/non-existent processes #1430

Closed
markonyango opened this issue Dec 17, 2024 · 2 comments · Fixed by #1431
Closed

System refresh_all does not remove dead/non-existent processes #1430

markonyango opened this issue Dec 17, 2024 · 2 comments · Fixed by #1431

Comments

@markonyango
Copy link

self.refresh_processes_specifics(ProcessesToUpdate::All, false, kind);

When calling .refresh_all on an instance of sysinfo::common::system::System it does not remove processes that no longer exist. .refresh_all is merely an alias for calling 'refresh_specifics(RefreshKind::everything())' which implies that old data would be removed if it is no longer existent. The call to .refresh_processes_specifics is made with remove_dead_processes being false though.

In my opinion this should either be made transparent in the functions documentation or be changed to be called with remove_dead_processes to be false (with all performance implications that come along with it).

@GuillaumeGomez
Copy link
Owner

refresh_all should indeed take an extra argument for this.

@GuillaumeGomez
Copy link
Owner

Ah no, ok I see the issue. I'll update the effect and the docs.

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