Skip to content
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

fix CI #302

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading