killall: Continue killing processes if kill() call fails

This commit is contained in:
Tim Ledbetter 2023-05-30 20:26:13 +01:00 committed by Andreas Kling
parent d97614a31e
commit cd08870a64
Notes: sideshowbarker 2024-07-16 19:29:26 +09:00

View file

@ -25,7 +25,8 @@ static ErrorOr<int> kill_all(StringView process_name, unsigned const signum)
for (auto& process : all_processes.processes) {
if (process.name == process_name) {
TRY(Core::System::kill(process.pid, signum));
if (auto maybe_error = Core::System::kill(process.pid, signum); maybe_error.is_error())
warnln("{}", maybe_error.release_error());
}
}