Call exit() instead of just returning if child fails.
authorKristian Høgsberg <krh@redhat.com>
Sat, 21 Jun 2008 02:27:07 +0000 (22:27 -0400)
committerKristian Høgsberg <krh@redhat.com>
Sat, 21 Jun 2008 02:27:07 +0000 (22:27 -0400)
librazor/rpm.c

index 7a26ef7..21fde8d 100644 (file)
@@ -594,16 +594,16 @@ run_script(struct installer *installer,
        } else if (pid == 0) {
                if (dup2(fd[0], STDIN_FILENO) < 0) {
                        fprintf(stderr, "failed redirect stdin, %m\n");
-                       return -1;
+                       exit(-1);
                }
                if (close(fd[0]) < 0 || close(fd[1]) < 0) {
                        fprintf(stderr, "failed to close pipe, %m\n");
-                       return -1;
+                       exit(-1);
                }
                if (chroot(installer->root) < 0) {
                        fprintf(stderr, "failed to chroot to %s, %m\n",
                                installer->root);
-                       return -1;
+                       exit(-1);
                }
                printf("executing program %s in chroot %s\n",
                       program, installer->root);