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-14 13:59:22 +0100
commit74ba5e1604d26d2b37026193983dfdc2faf5578d (patch)
treee7af6d89bdcedf93d4a8b6f0baaffe03babd556c
parent84d7e796a2753a654bb1f26905f2bebb3f6d0ff5 (diff)
downloadenlightenment-74ba5e1604d26d2b37026193983dfdc2faf5578d.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;