forked from enlightenment/efl
efl/exe: add 'pid' property
Reviewers: bu5hm4n, segfaultxavi Reviewed By: bu5hm4n Subscribers: bu5hm4n, vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11451
This commit is contained in:
parent
b69bc02c02
commit
798fdfbc70
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue