[macOS] Remove kill override.
This commit is contained in:
parent
739019e4e4
commit
9949d5a089
2 changed files with 0 additions and 13 deletions
|
@ -109,7 +109,6 @@ public:
|
||||||
virtual String get_executable_path() const override;
|
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_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 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 bool is_process_running(const ProcessID &p_pid) const override;
|
||||||
|
|
||||||
virtual String get_unique_id() const override;
|
virtual String get_unique_id() const override;
|
||||||
|
|
|
@ -675,18 +675,6 @@ bool OS_MacOS::is_process_running(const ProcessID &p_pid) const {
|
||||||
return ![app isTerminated];
|
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 {
|
String OS_MacOS::get_unique_id() const {
|
||||||
static String serial_number;
|
static String serial_number;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue