char *penv_display;
char buf[4096], buf2[32];
Ecore_Exe *ex;
+ E_App_Instance *inst = NULL;
+ E_App *a;
E_OBJECT_CHECK_RETURN(zone, 0);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0);
snprintf(buf, sizeof(buf), "E_START|%i", startup_id);
e_util_env_set("DESKTOP_STARTUP_ID", buf);
/* execute */
- ex = ecore_exe_run(exe, NULL);
+ a = e_app_exe_find(exe);
+ if (!a)
+ {
+ a = E_NEW(E_App, 1);
+ a->name = strdup (exe);
+ a->exe = strdup (exe);
+ }
+
+ inst = E_NEW(E_App_Instance, 1);
+ if (!inst) return 0;
+
+ ex = ecore_exe_pipe_run(exe, ECORE_EXE_PIPE_AUTO | ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR | ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_ERROR_LINE_BUFFERED, inst);
if (!ex)
{
+ free(inst);
e_error_dialog_show(_("Run Error"),
_("Enlightenment was unable to fork a child process:\n"
"\n"
exe);
ret = 0;
}
- else
- {
- ecore_exe_free(ex);
- ret = 1;
- }
/* reset env vars */
+ else ret = 1;
if (penv_display)
{
e_util_env_set("DISPLAY", penv_display);
free(penv_display);
}
+ /* 20 lines at start and end, 20x100 limit on bytes at each end. */
+ ecore_exe_auto_limits_set(ex, 2000, 2000, 20, 20);
+ ecore_exe_tag_set(ex, "E/app");
+ inst->app = a;
+ inst->exe = ex;
+ inst->launch_id = startup_id;
+ inst->launch_time = ecore_time_get();
+ a->instances = evas_list_append(a->instances, inst);
+ if (a->startup_notify) a->starting = 1;
return ret;
}