diff options
author | Krithic Kumar <30691152+notjedi@users.noreply.github.com> | 2024-03-18 10:59:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 13:29:47 +0800 |
commit | 1997bce393313d7ba685ee127d743e3a310530ac (patch) | |
tree | bf5190061ccba2e3ff8f703c39448b585f175ee0 /src/os/lsof.rs | |
parent | f892d2f758ea342ddbdb5d64eaed6e63fa8d1ddd (diff) |
feat: add `PID` column to `Process` table (#379)
* feat: add `PID` column to `Process` table
* fix(tests): populate fake data with the correct `ProcessInfo` type
* test: update snapshots
* refactor: use more idiomatic rust
* refactor: rename function from `get_proc_name` to `get_proc_info`
* refactor: only display PID when width available is highest
ref: https://github.com/imsnif/bandwhich/pull/165#issuecomment-620852892
* tests: update snapshots
* chore: update CHANGELOG
* fix: clippy warnings
* Revert "fix: clippy warnings"
This reverts commit e5f06cba1943d60b43a19957c42e3178c6916f69.
We will do this separately for the sake of keeping a clean history
* refactor: use `u32` for PID
* refactor: more idiomatic rust
---------
Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
Diffstat (limited to 'src/os/lsof.rs')
-rw-r--r-- | src/os/lsof.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/lsof.rs b/src/os/lsof.rs index 088d9cf..aec444d 100644 --- a/src/os/lsof.rs +++ b/src/os/lsof.rs @@ -2,7 +2,7 @@ use crate::{os::lsof_utils::get_connections, OpenSockets}; pub(crate) fn get_open_sockets() -> OpenSockets { let sockets_to_procs = get_connections() - .filter_map(|raw| raw.as_local_socket().map(|s| (s, raw.process_name))) + .filter_map(|raw| raw.as_local_socket().map(|s| (s, raw.proc_info))) .collect(); OpenSockets { sockets_to_procs } |