From 37c474a406f83f99e799a0f31ec8e673a6f0199a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Sat, 29 Dec 2007 16:43:34 -0500 Subject: [PATCH] Fix a bit of return -1 / exit(-1) confusion. --- rpm.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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) { -- 1.7.1