summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:15:20 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commit798fdfbc70a8160d7ec89a5829c01a0fccb40dd9 (patch)
tree2df2df9fdbbeee8eec8f296002984d27e40951f6 /src
parentb69bc02c022955c00243cbcdd1b97276fb470190 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore/efl_exe.c10
-rw-r--r--src/lib/ecore/efl_exe.eo9
2 files changed, 19 insertions, 0 deletions
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)
580 return pd->exit_signal; 580 return pd->exit_signal;
581} 581}
582 582
583EOLIAN static int
584_efl_exe_pid_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
585{
586#ifndef _WIN32
587 if (pd->pid != -1)
588 return pd->pid;
589#endif
590 return 0;
591}
592
583EOLIAN static Efl_Object * 593EOLIAN static Efl_Object *
584_efl_exe_efl_object_constructor(Eo *obj, Efl_Exe_Data *pd) 594_efl_exe_efl_object_constructor(Eo *obj, Efl_Exe_Data *pd)
585{ 595{
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
51 sig: int; [[The exit signal, or -1 if no exit signal happened.]] 51 sig: int; [[The exit signal, or -1 if no exit signal happened.]]
52 } 52 }
53 } 53 }
54 @property pid {
55 [[The pid of the process, which is only accessible after the object has been finalized.
56 @since 1.24
57 ]]
58 get { }
59 values {
60 pid: int; [[The pid, or 0 on failure.]]
61 }
62 }
54 @property env { 63 @property env {
55 [[If $env is $NULL then the process created by this object is 64 [[If $env is $NULL then the process created by this object is
56 going to inherit the environment of this process. 65 going to inherit the environment of this process.