From 9a9041bd9879ec99b219e6fae1c453952bcd5235 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Wed, 7 Jun 2023 20:07:37 +0200 Subject: [PATCH] killing non existing process does not throw error --- src/kernel/ps/ProcessManager.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/ps/ProcessManager.hx b/src/kernel/ps/ProcessManager.hx index a5ca3e6..a4dac82 100644 --- a/src/kernel/ps/ProcessManager.hx +++ b/src/kernel/ps/ProcessManager.hx @@ -28,7 +28,8 @@ class ProcessManager { public static function kill(pid: PID) { if (!processList.exists(pid)){ - throw new Error("Process with PID " + pid + " does not exist"); + Log.warn("Trying to kill non-existing process: " + pid); + return; } var handle = processList.get(pid);