-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add /proc/[pid]/cmdline support #877
Conversation
Please see this commit 09deddb to implement the |
Thanks @liqinggd ! I adopted your code and made a minor modification, which is more suitable and accurate using let cmdline_output = if self.0.is_zombie() {
// Returns 0 characters for zombie process.
Vec::new()
} else {
let Ok(argv_cstrs) = self.0.vm().init_stack_reader().argv() else {
return Ok(Vec::new());
};
argv_cstrs
.into_iter()
.flat_map(|c_str| c_str.into_bytes_with_nul().into_iter())
.collect()
};
Ok(cmdline_output) |
LGTM |
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.
LGTM. Thanks for the contribution!
No description provided.