elm_init_cnt = elm_init(__argc, __argv);
_D("[candidate] elm init, returned: %d", elm_init_cnt);
+ setenv("AUL_LOADER_INIT", "1", 1);
switch (__type) {
case TYPE_SW:
static int __loader_terminate_cb(int argc, char **argv, void *user_data)
{
void *handle;
- int res;
int (*dl_main)(int, char **);
char err_str[MAX_LOCAL_BUFSZ];
char old_cwd[PATH_MAX];
}
free(libdir);
- res = dl_main(argc, argv);
- elm_shutdown();
-
- return res;
+ return dl_main(argc, argv);
do_exec:
if (access(argv[LOADER_ARG_PATH], F_OK | R_OK)) {
if (libdir)
setenv("LD_LIBRARY_PATH", libdir, 1);
free(libdir);
+ unsetenv("AUL_LOADER_INIT");
if (execv(argv[LOADER_ARG_PATH], argv) < 0) {
SECURE_LOGE("execv() failed for file: \"%s\", " \
"error: %d (%s)", argv[LOADER_ARG_PATH], errno,