mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
Userland+LibCore: Use CProcessStatisticsReader to implement top.
Also tweaked CProcessStatisticsReader a bit to simplify the API.
This commit is contained in:
parent
7083a0104a
commit
01216f3c3f
5 changed files with 52 additions and 72 deletions
|
@ -13,7 +13,7 @@ static void print_usage_and_exit()
|
|||
|
||||
static int kill_all(const String& process_name, const unsigned signum)
|
||||
{
|
||||
HashMap<pid_t, CProcessStatistics> processes = CProcessStatisticsReader().get_map();
|
||||
auto processes = CProcessStatisticsReader().get_all();
|
||||
|
||||
for (auto& it : processes) {
|
||||
if (it.value.name == process_name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue