summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-06 12:32:22 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-06 12:32:22 +0200
commit4577b370366f46a8571583c0fbf779951ce0dc98 (patch)
treef9dc62c10cf3864e23ff0aba50df0abaea4a9be3 /platform
parent8ba212f188d5ff3bf0a993862e70d012bbe65cf1 (diff)
parent393741a7e21230c8664ae34e077d28c15a58af0d (diff)
downloadredot-engine-4577b370366f46a8571583c0fbf779951ce0dc98.tar.gz
Merge pull request #95191 from bruvzg/macos_term
[macOS] Attempt to terminate process normally before using `forceTerminate`.
Diffstat (limited to 'platform')
-rw-r--r--platform/macos/os_macos.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm
index 078be53a8d..495246344b 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -680,8 +680,11 @@ Error OS_MacOS::kill(const ProcessID &p_pid) {
if (!app) {
return OS_Unix::kill(p_pid);
}
-
- return [app forceTerminate] ? OK : ERR_INVALID_PARAMETER;
+ bool terminated = [app terminate];
+ if (!terminated) {
+ terminated = [app forceTerminate];
+ }
+ return terminated ? OK : ERR_INVALID_PARAMETER;
}
String OS_MacOS::get_unique_id() const {