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

fix: make processes also update if their parent changes #1235

Closed

Conversation

ssaavedra
Copy link

When a process dies, there is no way in your crate to note that the process' PPID is updated. This happens because even if you ask to update "everything", the condition for updating the process requires the process's start time differs and does not take into account if the PPID has changed through the lifetime of the process.

This is relevant for example if you want to use this crate to monitor orphaned processes.

@GuillaumeGomez
Copy link
Owner

Looks good to me, thanks! Could you add a test for it as well please?

Please also run cargo fmt.

@GuillaumeGomez
Copy link
Owner

One thing I thought: in case the parent PID changed, shouldn't we only update the parent PID in the process instead of everything?

@GuillaumeGomez
Copy link
Owner

I did #1239 so closing this.

@ssaavedra
Copy link
Author

Thanks, sorry I had badly configured notifications for this repo and I never got your comments to the right place. Thanks for merging work doing this :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants