summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-01 13:25:09 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-01 13:25:09 +0100
commit979a8e895314aecdcd79517d41dd473f74c02ea9 (patch)
tree2ad6d8060df4a97cf822bc6e4bbc95c637e499ee
parentdabda6154bfa4f2eaf5e945a1b95c2505502981c (diff)
downloadenlightenment-979a8e895314aecdcd79517d41dd473f74c02ea9.tar.gz
e exec - if an invalid exe is found - null it out
-rw-r--r--src/bin/e_exec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 0a9be5afe3..40cd0f3447 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -805,6 +805,14 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash EINA_UNUSED, const void *key E
search = data;
EINA_LIST_FOREACH(value, l, inst)
{
+ pid_t exe_pid;
+
+ exe_pid = 0;
+ if (inst->exe)
+ {
+ exe_pid = ecore_exe_pid_get(inst->exe);
+ if (exe_pid <= 0) inst->exe = NULL;
+ }
if (((search->desktop) &&
(search->desktop == inst->desktop)) ||
@@ -812,7 +820,7 @@ _e_exec_startup_id_pid_find(const Eina_Hash *hash EINA_UNUSED, const void *key E
(search->startup_id == inst->startup_id)) ||
((inst->exe) && (search->pid > 1) && (!inst->phony) &&
- (search->pid == ecore_exe_pid_get(inst->exe))))
+ (search->pid == exe_pid)))
{
search->inst = inst;
return EINA_FALSE;