ps: Properly implement -d flag

This commit is contained in:
Tuomas Tynkkynen
2025-10-26 23:27:29 +02:00
parent 701333c56b
commit 8edbe400b6
+7 -2
View File
@@ -85,9 +85,14 @@ pub(crate) fn session_collector(
let tty = |proc: &Rc<RefCell<ProcessInformation>>| proc.borrow_mut().tty();
// flag `-d`
// TODO: Implementation this collection, guessing it pid=sid
if matches.get_flag("d") {
proc_snapshot.iter().for_each(|_| {});
for proc_info in proc_snapshot {
let pid = proc_info.borrow().pid;
if getsid(pid as i32) != Some(pid as i32) {
result.push(proc_info.clone());
}
}
}
// flag `-a`