forked from enlightenment/efl
ecore - efl exe - use better exit codes
127 is the "command not found" shell exeit code, 126 is "the command file is found but is not executable" which i think i'd interpret not just for execute permissions but that something is preventing it from executing in general.
This commit is contained in:
parent
0a3e7c05e4
commit
308e9586dd
|
@ -511,9 +511,9 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
|
||||||
close(devnull);
|
close(devnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(loop = efl_provider_find(obj, EFL_LOOP_CLASS))) exit(-120);
|
if (!(loop = efl_provider_find(obj, EFL_LOOP_CLASS))) exit(1);
|
||||||
|
|
||||||
if (!(tdl = efl_data_scope_get(loop, EFL_TASK_CLASS))) exit(-121);
|
if (!(tdl = efl_data_scope_get(loop, EFL_TASK_CLASS))) exit(1);
|
||||||
|
|
||||||
// clear systemd notify socket... only relevant for systemd world,
|
// clear systemd notify socket... only relevant for systemd world,
|
||||||
// otherwise shouldn't be trouble
|
// otherwise shouldn't be trouble
|
||||||
|
@ -533,7 +533,10 @@ _efl_exe_efl_task_run(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
|
||||||
// actually execute!
|
// actually execute!
|
||||||
_exec(cmd, pd->flags);
|
_exec(cmd, pd->flags);
|
||||||
// we couldn't exec... uh oh. HAAAAAAAALP!
|
// we couldn't exec... uh oh. HAAAAAAAALP!
|
||||||
exit(-122);
|
if ((errno == EACCES) || (errno == EINVAL) || (errno == ELOOP) ||
|
||||||
|
(errno == ENOEXEC) || (errno == ENOMEM))
|
||||||
|
exit(126);
|
||||||
|
exit(127);
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue