summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Ledbetter <timledbetter@gmail.com>2023-05-30 20:26:13 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-31 06:00:45 +0200
commitcd08870a645800133f61fe4b220106211c40ae99 (patch)
tree53c2aecba6b86684c778525092efa3deac43d592
parentd97614a31e37cf1520e8e2d1af95d00ffeb0efcd (diff)
downloadserenity-cd08870a645800133f61fe4b220106211c40ae99.zip
killall: Continue killing processes if `kill()` call fails
-rw-r--r--Userland/Utilities/killall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Utilities/killall.cpp b/Userland/Utilities/killall.cpp
index b5ac86b9a5..dbf1f61916 100644
--- a/Userland/Utilities/killall.cpp
+++ b/Userland/Utilities/killall.cpp
@@ -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());
}
}