Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-01-20 10:32:11 +1000
committerAllan McRae <allan@archlinux.org>2013-01-28 23:30:40 +1000
commitad280e1b56b6c6632b2fae5288f6441c343d0185 (patch)
treebffdd98fb20dc1a1b16f234f0edd00309aed58b6 /lib/libalpm
parentb27886ab5967c30e2e80d46e47968c9f4a95e760 (diff)
Revert execvp and related commits
This reverts commit 4a8c2852a887d2b1aaa43be3071ab586eb24b9e3. This reverts commit 993700bc6b12cd291544d2a22845f480e8a7925e. This reverts commit bb4d2b72c1d35ab9d65d632be0dcaf00cfa7d600. This reverts commit 60b192e3836a150eb6950ce52241efebbee00f11. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/util.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index fd1d7868..c88326f2 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -549,9 +549,9 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[])
exit(1);
}
umask(0022);
- execvp(cmd, argv);
- /* execvp only returns if there was an error */
- fprintf(stderr, _("call to execvp failed (%s)\n"), strerror(errno));
+ execv(cmd, argv);
+ /* execv only returns if there was an error */
+ fprintf(stderr, _("call to execv failed (%s)\n"), strerror(errno));
exit(1);
} else {
/* this code runs for the parent only (wait on the child) */
@@ -621,10 +621,13 @@ int _alpm_ldconfig(alpm_handle_t *handle)
snprintf(line, PATH_MAX, "%setc/ld.so.conf", handle->root);
if(access(line, F_OK) == 0) {
- char arg0[32];
- char *argv[] = { arg0, NULL };
- strcpy(arg0, "ldconfig");
- return _alpm_run_chroot(handle, "ldconfig", argv);
+ snprintf(line, PATH_MAX, "%ssbin/ldconfig", handle->root);
+ if(access(line, X_OK) == 0) {
+ char arg0[32];
+ char *argv[] = { arg0, NULL };
+ strcpy(arg0, "ldconfig");
+ return _alpm_run_chroot(handle, "/sbin/ldconfig", argv);
+ }
}
return 0;