From 9949d5a089ce89f102d3c84a256f8933f235fc21 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:39:00 +0300 Subject: [PATCH] [macOS] Remove kill override. --- platform/macos/os_macos.h | 1 - platform/macos/os_macos.mm | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/platform/macos/os_macos.h b/platform/macos/os_macos.h index df3a4009a3c..303fc112bf9 100644 --- a/platform/macos/os_macos.h +++ b/platform/macos/os_macos.h @@ -109,7 +109,6 @@ public: virtual String get_executable_path() const override; virtual Error create_process(const String &p_path, const List &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override; virtual Error create_instance(const List &p_arguments, ProcessID *r_child_id = nullptr) override; - virtual Error kill(const ProcessID &p_pid) override; virtual bool is_process_running(const ProcessID &p_pid) const override; virtual String get_unique_id() const override; diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm index 495246344bd..3a825147664 100644 --- a/platform/macos/os_macos.mm +++ b/platform/macos/os_macos.mm @@ -675,18 +675,6 @@ bool OS_MacOS::is_process_running(const ProcessID &p_pid) const { return ![app isTerminated]; } -Error OS_MacOS::kill(const ProcessID &p_pid) { - NSRunningApplication *app = [NSRunningApplication runningApplicationWithProcessIdentifier:(pid_t)p_pid]; - if (!app) { - return OS_Unix::kill(p_pid); - } - bool terminated = [app terminate]; - if (!terminated) { - terminated = [app forceTerminate]; - } - return terminated ? OK : ERR_INVALID_PARAMETER; -} - String OS_MacOS::get_unique_id() const { static String serial_number;