summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-07-07 17:11:18 +0200
committerDan McGee <dan@archlinux.org>2007-07-09 17:47:05 -0400
commit57d77eab32c01cd7572a11f76480a3724d09c029 (patch)
tree3b7e446ab0f4dea26ae6539a5acc5b2017f4c4d6
parent8f2575b26ee34caddcd03464a53dc88ac539c98c (diff)
libalpm/trans.c : exit the forked process correctly in case of errors.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
-rw-r--r--lib/libalpm/trans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 5d62e8e8..d0deb5ca 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -639,11 +639,11 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
_alpm_log(PM_LOG_DEBUG, _("chrooting in %s"), root);
if(chroot(root) != 0) {
_alpm_log(PM_LOG_ERROR, _("could not change the root directory (%s)"), strerror(errno));
- return(1);
+ exit(1);
}
if(chdir("/") != 0) {
_alpm_log(PM_LOG_ERROR, _("could not change directory to / (%s)"), strerror(errno));
- return(1);
+ exit(1);
}
umask(0022);
_alpm_log(PM_LOG_DEBUG, _("executing \"%s\""), cmdline);