Some FDs (specifically, the ones used for dlog logging)
are in use between current close_all_fds call spot and exec
Change-Id: Ie64fad2cef350c2e2931da6a3c21200471b23fdb
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
setenv("LD_LIBRARY_PATH", libdir, 1);
free(libdir);
+ _close_all_fds();
if (execv(argv[LOADER_ARG_PATH], argv) < 0) { /* Flawfinder: ignore */
if (errno == EACCES) {
_E("such a file is no executable - %s",
__signal_unblock_sigchld();
__signal_fini();
- _close_all_fds();
_delete_sock_path(getpid(), getuid());
PERF("prepare exec - first done");