From: Hwankyu Jhun Date: Fri, 16 Dec 2016 09:48:22 +0000 (+0900) Subject: Add AUL_LOADER_INIT to the environment X-Git-Tag: accepted/tizen/3.0/common/20161219.113554^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10fff8d425c3fd1296cd023b8a365d17e1d614b2;p=platform%2Fcore%2Fappfw%2Flaunchpad.git Add AUL_LOADER_INIT to the environment - Requires https://review.tizen.org/gerrit/105374 Change-Id: If6a483c333f13b163b8a22b49defe1d848c4632e Signed-off-by: Hwankyu Jhun --- diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c index 9e6d08c..5dfe2e1 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -195,6 +195,7 @@ static void __loader_create_cb(bundle *extra, int type, void *user_data) 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: @@ -270,7 +271,6 @@ static int __loader_launch_cb(int argc, char **argv, const char *app_path, 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]; @@ -319,10 +319,7 @@ do_dlopen: } 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)) { @@ -336,6 +333,7 @@ do_exec: 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,