diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index b2c6341523..4580a41351 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -580,6 +580,16 @@ _efl_exe_exit_signal_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) return pd->exit_signal; } +EOLIAN static int +_efl_exe_pid_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd) +{ +#ifndef _WIN32 + if (pd->pid != -1) + return pd->pid; +#endif + return 0; +} + EOLIAN static Efl_Object * _efl_exe_efl_object_constructor(Eo *obj, Efl_Exe_Data *pd) { diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo index 23b68935e4..11f6519be3 100644 --- a/src/lib/ecore/efl_exe.eo +++ b/src/lib/ecore/efl_exe.eo @@ -51,6 +51,15 @@ class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Ef sig: int; [[The exit signal, or -1 if no exit signal happened.]] } } + @property pid { + [[The pid of the process, which is only accessible after the object has been finalized. + @since 1.24 + ]] + get { } + values { + pid: int; [[The pid, or 0 on failure.]] + } + } @property env { [[If $env is $NULL then the process created by this object is going to inherit the environment of this process.