commit bash-20101001 snapshot

This commit is contained in:
Chet Ramey
2011-12-12 22:07:35 -05:00
parent 7fb4dd6d44
commit aad3dfa27a
17 changed files with 690 additions and 29 deletions
+11 -1
View File
@@ -256,6 +256,8 @@ SHELL_VAR *this_shell_function;
/* If non-zero, matches in case and [[ ... ]] are case-insensitive */
int match_ignore_case = 0;
int executing_command_builtin = 0;
struct stat SB; /* used for debugging */
static int special_builtin_failed;
@@ -3889,7 +3891,10 @@ run_builtin:
if (builtin || func)
{
if (builtin)
unwind_protect_int (executing_builtin); /* modified in execute_builtin */
{
unwind_protect_int (executing_builtin); /* modified in execute_builtin */
unwind_protect_int (executing_command_builtin); /* ditto */
}
if (already_forked)
{
/* reset_terminating_signals (); */ /* XXX */
@@ -4076,6 +4081,7 @@ execute_builtin (builtin, words, flags, subshell)
}
executing_builtin++;
executing_command_builtin |= builtin == command_builtin;
result = ((*builtin) (words->next));
/* This shouldn't happen, but in case `return' comes back instead of
@@ -4928,7 +4934,11 @@ shell_execve (command, args, env)
if (i != ENOEXEC)
{
if (file_isdir (command))
#if defined (EISDIR)
internal_error (_("%s: %s"), command, strerror (EISDIR));
#else
internal_error (_("%s: is a directory"), command);
#endif
else if (executable_file (command) == 0)
{
errno = i;