ps: Fix priority of -e and --pids options

This commit is contained in:
Tuomas Tynkkynen
2025-11-03 21:00:04 +02:00
parent 822b4e30d6
commit 6675c30ded
+4 -4
View File
@@ -82,14 +82,14 @@ impl ProcessSelectionSettings {
return Ok(false);
}
if let Some(ref pids) = self.pids {
return Ok(pids.contains(&process.pid));
}
if self.select_all {
return Ok(true);
}
if let Some(ref pids) = self.pids {
return Ok(pids.contains(&process.pid));
}
if self.select_non_session_leaders_with_tty {
return Ok(!is_session_leader(process) && process.tty() != Teletype::Unknown);
}