mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 01:41:52 -05:00
Use execvp for running programs in chroot
This makes us more robust to utilities changing paths. There is no functional change when a full path is specified. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9c160cf3f3
commit
60b192e383
@ -549,9 +549,9 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[])
|
||||
exit(1);
|
||||
}
|
||||
umask(0022);
|
||||
execv(cmd, argv);
|
||||
/* execv only returns if there was an error */
|
||||
fprintf(stderr, _("call to execv failed (%s)\n"), strerror(errno));
|
||||
execvp(cmd, argv);
|
||||
/* execvp only returns if there was an error */
|
||||
fprintf(stderr, _("call to execvp failed (%s)\n"), strerror(errno));
|
||||
exit(1);
|
||||
} else {
|
||||
/* this code runs for the parent only (wait on the child) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user