Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tatref committed Feb 5, 2024
1 parent a8bda9e commit 2566c5a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion procfs/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
//! // build up a map between socket inodes and process stat info:
//! let mut map: HashMap<u64, Stat> = HashMap::new();
//! for p in all_procs {
//! let process = p.unwrap();
//! let Ok(process) = p else {
//! // process vanished
//! continue;
//! };
//! if let (Ok(stat), Ok(fds)) = (process.stat(), process.fd()) {
//! for fd in fds {
//! if let FDTarget::Socket(inode) = fd.unwrap().target {
Expand Down
10 changes: 9 additions & 1 deletion procfs/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@
//!
//! let tty = format!("pty/{}", me_stat.tty_nr().1);
//! for prc in procfs::process::all_processes().unwrap() {
//! if let Ok(stat) = prc.unwrap().stat() {
//! let Ok(prc) = prc else {
//! // process vanished
//! continue;
//! };
//! let Ok(stat) = prc.stat() else {
//! // process vanished
//! continue;
//! };
//! if let Ok(stat) = prc.stat() {
//! if stat.tty_nr == me_stat.tty_nr {
//! // total_time is in seconds
//! let total_time =
Expand Down

0 comments on commit 2566c5a

Please sign in to comment.