From: Junghyun Yeon Date: Tue, 26 Jan 2021 09:30:09 +0000 (+0900) Subject: Add codes to check backend execution result X-Git-Tag: submit/tizen/20210319.065928~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96f18d1ce9b0ea2fbbad08e3d26885eaf0c279e1;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git Add codes to check backend execution result Tool may add flags depends on backend execution result Change-Id: I019d657d8d18e04d205702f3fd3bf0696f6f2357 Signed-off-by: Junghyun Yeon --- diff --git a/src/install_preload_pkg/install_preload_pkg.c b/src/install_preload_pkg/install_preload_pkg.c index ab2396a..d16d9a0 100644 --- a/src/install_preload_pkg/install_preload_pkg.c +++ b/src/install_preload_pkg/install_preload_pkg.c @@ -171,6 +171,12 @@ static int _install_preload_pkg(const char *backend, const char *directory, if (pid > 0) { int status = 0; waitpid(pid, &status, 0); + if (WIFEXITED(status) == 0 || WEXITSTATUS(status) != 0) { + _E("Execution failed : %s", backend); + closedir(dir); + g_list_free_full(preload_rw_pkg_list, __free_pkginfo); + return -1; + } } if (!readonly) {