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.kill()'s return value is undocumented #1407

Closed
sloganking opened this issue Dec 1, 2024 · 3 comments · Fixed by #1408
Closed

process.kill()'s return value is undocumented #1407

sloganking opened this issue Dec 1, 2024 · 3 comments · Fixed by #1408
Labels

Comments

@sloganking
Copy link

https://docs.rs/sysinfo/0.32.1/sysinfo/struct.Process.html#method.kill

impl Process
pub fn kill(&self) -> bool

The return value here has no documentation. I assume it returns true if the process was successfully killed and false if the process was not successfully killed. But per my testing, I'm getting weird behavior and I'm not entirely sure if that's true. Can anyone answer when the boolean will be true and false and add documentation to the function that says so?

@sloganking sloganking added the bug label Dec 1, 2024
@GuillaumeGomez
Copy link
Owner

Good point. Gonna add documentation for it.

@sloganking
Copy link
Author

@GuillaumeGomez I see #1408 which describes what returning Some(true) is. What happens if it returns None or Some(false)?

@GuillaumeGomez
Copy link
Owner

None is described. But I'll clarify the boolean part.

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