Skip to content

Commit

Permalink
Merge pull request #302 from tatref/fix-ci
Browse files Browse the repository at this point in the history
fix CI
  • Loading branch information
eminence authored Feb 14, 2024
2 parents a8bda9e + 2566c5a commit e734c74
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 e734c74

Please sign in to comment.