Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Remove kill override. #95295

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion platform/macos/os_macos.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class OS_MacOS : public OS_Unix {
virtual String get_executable_path() const override;
virtual Error create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false) override;
virtual Error create_instance(const List<String> &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;
Expand Down
12 changes: 0 additions & 12 deletions platform/macos/os_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -675,18 +675,6 @@
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;

Expand Down
Loading