diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/os_unix.cpp | 6 | ||||
-rw-r--r-- | drivers/unix/os_unix.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 399d0247fc..1af37e2a60 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -333,6 +333,12 @@ Error OS_Unix::kill(const ProcessID& p_pid) { return ret?ERR_INVALID_PARAMETER:OK; } +int OS_Unix::get_process_ID() const { + + return getpid(); +}; + + bool OS_Unix::has_environment(const String& p_var) const { return getenv(p_var.utf8().get_data())!=NULL; diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 72943ac25b..1dcf0bd2fd 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -98,6 +98,7 @@ public: virtual Error execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id=NULL,String* r_pipe=NULL,int *r_exitcode=NULL); virtual Error kill(const ProcessID& p_pid); + virtual int get_process_ID() const; virtual bool has_environment(const String& p_var) const; virtual String get_environment(const String& p_var) const; |