You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling refresh_process is equivalent to calling refresh_processes_specifics(ProcessRefreshKind::everything()), so it triggers refresh_kind.cpu(), and we never set the updated status of the process to false.
This in turn, prevents the process from being removed from the list here (only for the next refresh_processes call):
I currently workaround this by using instead ProcessRefreshKind::everything().without_cpu(), but it seems calling refresh_process should never alter the result of the following call to refresh_processes with any RefreshKind.
The text was updated successfully, but these errors were encountered:
eskarn
changed the title
[Linux] Issue with process removal logic after calling refresh_process
[Linux] Issue with process removal logic after calling refresh_process()Feb 2, 2022
So interestingly enough, if it's a child from your current process and you kill it, you need to wait for it otherwise it'll stay around with a "zombie" status until the current process is dead. I made some clean up and added tests to enforce it.
I'm observing an issue with the following scenario:
refresh_processes()
refresh_process()
on a running process Prefresh_processes()
processes()
to get the list of running processesThe result of step 5 is incorrect because it still contains the killed process P but only if step 2 is executing, otherwise the result is correct.
I'm not sure if this intended behavior, but to me this seems like a logic issue in this code :
sysinfo/src/linux/system.rs
Line 449 in a0b2467
Calling
refresh_process
is equivalent to callingrefresh_processes_specifics(ProcessRefreshKind::everything())
, so it triggersrefresh_kind.cpu()
, and we never set the updated status of the process to false.This in turn, prevents the process from being removed from the list here (only for the next
refresh_processes
call):sysinfo/src/linux/system.rs
Line 213 in a0b2467
I currently workaround this by using instead
ProcessRefreshKind::everything().without_cpu()
, but it seems callingrefresh_process
should never alter the result of the following call torefresh_processes
with any RefreshKind.The text was updated successfully, but these errors were encountered: