When the loader fails to find the main function, it tries to execute
an application using execv(). Before calling execv(), the loader closes
all opened file descriptors. Unfortunately, the loader can have crashed
by that. To avoid crash issues, this patch removes calling CloseAllFds().
Change-Id: I902d2f73ae30dc63e4d82599da6c1ced436e3920
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
argv_[0], errno, strerror_r(errno, err_str, sizeof(err_str)));
} else {
SECURE_LOGD("[candidate] Exec application (%s)", argv_[0]);
argv_[0], errno, strerror_r(errno, err_str, sizeof(err_str)));
} else {
SECURE_LOGD("[candidate] Exec application (%s)", argv_[0]);
- launchpad::Util::CloseAllFds();
if (!libdir.empty())
setenv("LD_LIBRARY_PATH", libdir.c_str(), 1);
unsetenv("AUL_LOADER_INIT");
if (!libdir.empty())
setenv("LD_LIBRARY_PATH", libdir.c_str(), 1);
unsetenv("AUL_LOADER_INIT");
SECURE_LOGE("access() is failed. path(%s), errno(%d)", argv[0], errno);
SECURE_LOGD("Execute application. path(%s)", argv[0]);
SECURE_LOGE("access() is failed. path(%s), errno(%d)", argv[0], errno);
SECURE_LOGD("Execute application. path(%s)", argv[0]);
if (!lib_dir.empty())
setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1);
if (!lib_dir.empty())
setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1);