mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
commit bash-20101001 snapshot
This commit is contained in:
+11
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user