From 59cbe436435c1c908fe5103d61469f6e7ae8a609 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 20 Jun 2008 22:27:07 -0400 Subject: [PATCH] Call exit() instead of just returning if child fails. --- librazor/rpm.c | 6 +++--- 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); -- 1.7.1