From: Kristian Høgsberg Date: Sat, 29 Dec 2007 21:43:34 +0000 (-0500) Subject: Fix a bit of return -1 / exit(-1) confusion. X-Git-Tag: 0.1~271 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=37c474a406f83f99e799a0f31ec8e673a6f0199a;p=razor.git Fix a bit of return -1 / exit(-1) confusion. --- diff --git a/rpm.c b/rpm.c index 0eac911..1e7a67c 100644 --- a/rpm.c +++ b/rpm.c @@ -382,7 +382,7 @@ run_script(struct installer *installer, } if (close(fd[0]) < 0 || close(fd[1]) < 0) { fprintf(stderr, "failed to close pipe, %m\n"); - exit(-1); + return -1; } if (chroot(installer->root) < 0) { fprintf(stderr, "failed to chroot to %s, %m\n", @@ -393,7 +393,7 @@ run_script(struct installer *installer, program, installer->root); if (execl(program, program, NULL)) { fprintf(stderr, "failed to exec %s, %m\n", program); - return -1; + exit(-1); } } else { if (script && write(fd[1], script, strlen(script)) < 0) {