summaryrefslogtreecommitdiff
path: root/librazor
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-06-20 22:27:07 -0400
committerKristian Høgsberg <krh@redhat.com>2008-06-20 22:27:07 -0400
commit59cbe436435c1c908fe5103d61469f6e7ae8a609 (patch)
tree66be29110777c895db960ec7a9015ae61b033bca /librazor
parent20616aa76defb7a07971842861b7bed2c4049bd6 (diff)
Call exit() instead of just returning if child fails.
Diffstat (limited to 'librazor')
-rw-r--r--librazor/rpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/librazor/rpm.c b/librazor/rpm.c
index 7a26ef7..21fde8d 100644
--- a/librazor/rpm.c
+++ b/librazor/rpm.c
@@ -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);