diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-20 19:41:57 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-20 19:41:57 +0200 |
commit | 180de7e8c5ba2d4c4517cf923c98c943c95c2295 (patch) | |
tree | c2725529194ee32a65b893e4cd7f55e1fa8aac46 /Applications | |
parent | de913529d7c7c76ba78dbbf0d2bfd1dae5a96437 (diff) | |
download | serenity-180de7e8c5ba2d4c4517cf923c98c943c95c2295.zip |
ProcessManager: Exclude colonel process from process listing.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/ProcessManager/ProcessModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/ProcessManager/ProcessModel.cpp b/Applications/ProcessManager/ProcessModel.cpp index cbd19e64d2..eae0ce0ead 100644 --- a/Applications/ProcessManager/ProcessModel.cpp +++ b/Applications/ProcessManager/ProcessModel.cpp @@ -23,7 +23,7 @@ ProcessModel::~ProcessModel() int ProcessModel::row_count(const GModelIndex&) const { - return m_processes.size(); + return m_pids.size(); } int ProcessModel::column_count(const GModelIndex&) const @@ -203,11 +203,11 @@ void ProcessModel::update() pids_to_remove.append(it.key); continue; } - auto& process = *it.value; dword nsched_diff = process.current_state.nsched - process.previous_state.nsched; process.current_state.cpu_percent = ((float)nsched_diff * 100) / (float)(sum_nsched - last_sum_nsched); - m_pids.append(it.key); + if (it.key != 0) + m_pids.append(it.key); } for (auto pid : pids_to_remove) m_processes.remove(pid); |