Add codes to check backend execution result 00/252300/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 26 Jan 2021 09:30:09 +0000 (18:30 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 26 Jan 2021 09:30:09 +0000 (18:30 +0900)
Tool may add flags depends on backend execution result

Change-Id: I019d657d8d18e04d205702f3fd3bf0696f6f2357
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/install_preload_pkg/install_preload_pkg.c

index ab2396a618c4e2224b1dc8f436691b0438fd752a..d16d9a0fbf224e46d514d08c23b92e6f20ec02d4 100644 (file)
@@ -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) {