libalpm/trans.c : exit the forked process correctly in case of errors.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
This commit is contained in:
parent
8f2575b26e
commit
57d77eab32
1 changed files with 2 additions and 2 deletions
|
@ -639,11 +639,11 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
|
||||||
_alpm_log(PM_LOG_DEBUG, _("chrooting in %s"), root);
|
_alpm_log(PM_LOG_DEBUG, _("chrooting in %s"), root);
|
||||||
if(chroot(root) != 0) {
|
if(chroot(root) != 0) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not change the root directory (%s)"), strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not change the root directory (%s)"), strerror(errno));
|
||||||
return(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if(chdir("/") != 0) {
|
if(chdir("/") != 0) {
|
||||||
_alpm_log(PM_LOG_ERROR, _("could not change directory to / (%s)"), strerror(errno));
|
_alpm_log(PM_LOG_ERROR, _("could not change directory to / (%s)"), strerror(errno));
|
||||||
return(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
umask(0022);
|
umask(0022);
|
||||||
_alpm_log(PM_LOG_DEBUG, _("executing \"%s\""), cmdline);
|
_alpm_log(PM_LOG_DEBUG, _("executing \"%s\""), cmdline);
|
||||||
|
|
Loading…
Add table
Reference in a new issue