-
Notifications
You must be signed in to change notification settings - Fork 54
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
get pid api #1890
get pid api #1890
Conversation
Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the motivation for that PR.
Except to remove the use of nix::unistd::Pid
in flockfile
. But std::process::id()
is all what we need.
Robot Results
Passed Tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
@@ -173,6 +172,7 @@ mod tests { | |||
|
|||
use super::*; | |||
use assert_matches::*; | |||
use nix::unistd::Pid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not also use std::process::id()
in the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought of having a different way of getting the pid
for testing purposes.
Proposed changes
Implement
get_pid
api and re-use it.Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments