use user's shell instead of hardwired "/bin/sh" (android needs this)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-03-08 21:00:36 +01:00
parent 86cf0364bd
commit 681efe20d3
12 changed files with 38 additions and 28 deletions

View File

@ -99,8 +99,12 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
close(p[1]);
xdup2(p[0], STDIN_FILENO);
signal(SIGPIPE, SIG_DFL);
execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", archive_handle->tar__to_command, NULL);
bb_perror_msg_and_die("can't execute '%s'", DEFAULT_SHELL);
execl(archive_handle->tar__to_command_shell,
archive_handle->tar__to_command_shell,
"-c",
archive_handle->tar__to_command,
NULL);
bb_perror_msg_and_die("can't execute '%s'", archive_handle->tar__to_command_shell);
}
close(p[0]);
/* Our caller is expected to do signal(SIGPIPE, SIG_IGN)