Skip to content

Commit 37068fa

Browse files
Add initial partial Pid parsing enum
1 parent 04b84de commit 37068fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/procrs/pid/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use TaskId;
2323
/// /proc/[pid] directory (for the respective pid).
2424
#[derive(Debug)]
2525
pub struct Pid {
26+
// FIXME: Take Vec<PidFile> to indicate which things to parse
2627
/// The tid of this process
2728
pub pid: TaskId,
2829
/// The /proc/[pid]/stat file
@@ -140,6 +141,13 @@ impl Ord for Pid {
140141
}
141142
}
142143

144+
/// A list of files in the pid directory.
145+
enum PIdFiles {
146+
PidStatus,
147+
PidStat,
148+
PidCmdline
149+
}
150+
143151
/// An Iterator over processes in the system.
144152
///
145153
/// If a process disappears while scanning it, the partial Pid struct

0 commit comments

Comments
 (0)