summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-04-07 20:19:46 +0200
committerkobewi <kobewi4e@gmail.com>2024-04-16 12:46:15 +0200
commitdce4a3e4c28e5320c0cb761600f557aebc175a4a (patch)
treef3ad68f5644bbd10238ccd46d055bbd5a4eea422 /drivers/unix/os_unix.h
parent30e71782afd9a1fd35707b89511bcd1aa538f673 (diff)
downloadredot-engine-dce4a3e4c28e5320c0cb761600f557aebc175a4a.tar.gz
Add get_process_exit_code() method
Diffstat (limited to 'drivers/unix/os_unix.h')
-rw-r--r--drivers/unix/os_unix.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 2936c28797..a107e7a0e3 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -37,6 +37,13 @@
#include "drivers/unix/ip_unix.h"
class OS_Unix : public OS {
+ struct ProcessInfo {
+ mutable bool is_running = true;
+ mutable int exit_code = -1;
+ };
+ HashMap<ProcessID, ProcessInfo> *process_map = nullptr;
+ Mutex process_map_mutex;
+
protected:
// UNIX only handles the core functions.
// inheriting platforms under unix (eg. X11) should handle the rest
@@ -81,6 +88,7 @@ public:
virtual Error kill(const ProcessID &p_pid) override;
virtual int get_process_id() const override;
virtual bool is_process_running(const ProcessID &p_pid) const override;
+ virtual int get_process_exit_code(const ProcessID &p_pid) const override;
virtual bool has_environment(const String &p_var) const override;
virtual String get_environment(const String &p_var) const override;