mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibCore: Use Core::Stream
for ProcessStatisticsReader
This commit is contained in:
parent
e338a0656d
commit
8940f2da7f
18 changed files with 55 additions and 95 deletions
|
@ -38,12 +38,10 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
|||
return 1;
|
||||
}
|
||||
|
||||
auto all_processes = Core::ProcessStatisticsReader::get_all();
|
||||
if (!all_processes.has_value())
|
||||
return 1;
|
||||
auto all_processes = TRY(Core::ProcessStatisticsReader::get_all());
|
||||
|
||||
Vector<pid_t> matches;
|
||||
for (auto& it : all_processes.value().processes) {
|
||||
for (auto& it : all_processes.processes) {
|
||||
auto result = re.match(it.name, PosixFlags::Global);
|
||||
if (result.success ^ invert_match) {
|
||||
matches.append(it.pid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue