From f3c1232c5984a540c33841694469febbe951e7a8 Mon Sep 17 00:00:00 2001 From: mdavisprog Date: Thu, 12 Aug 2021 20:36:23 -0700 Subject: Add OS::is_process_running function. Adds the is_process_running function to the native OS class and exposes it to script. This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function. Documentation is updated to reflect new API function. --- platform/uwp/os_uwp.cpp | 4 ++++ platform/uwp/os_uwp.h | 1 + 2 files changed, 5 insertions(+) (limited to 'platform/uwp') diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index f002e47f2d..1614bfdcc3 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -647,6 +647,10 @@ Error OS_UWP::kill(const ProcessID &p_pid) { return FAILED; } +bool OS_UWP::is_process_running(const ProcessID &p_pid) const { + return false; +} + Error OS_UWP::set_cwd(const String &p_cwd) { return FAILED; } diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index bde65257be..bddf63ff18 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -198,6 +198,7 @@ public: virtual Error execute(const String &p_path, const List &p_arguments, String *r_pipe = nullptr, int *r_exitcode = nullptr, bool read_stderr = false, Mutex *p_pipe_mutex = nullptr, bool p_open_console = false); virtual Error create_process(const String &p_path, const List &p_arguments, ProcessID *r_child_id = nullptr, bool p_open_console = false); virtual Error kill(const ProcessID &p_pid); + virtual bool is_process_running(const ProcessID &p_pid) const; virtual bool has_environment(const String &p_var) const; virtual String get_environment(const String &p_var) const; -- cgit v1.2.3