commit bash-20141121 snapshot

This commit is contained in:
Chet Ramey
2014-12-02 16:14:59 -05:00
parent de2574ae4b
commit 0a233f3ec4
61 changed files with 16154 additions and 1627 deletions
+10 -3
View File
@@ -722,7 +722,7 @@ main (argc, argv, env)
/* Bind remaining args to $1 ... $n */
arg_index = bind_args (argv, arg_index, argc, 1);
if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && dollar_vars[1])
if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0 && (dollar_vars[1] || interactive_shell == 0))
start_debugger ();
/* Do the things that should be done only for interactive shells. */
@@ -1408,12 +1408,19 @@ start_debugger ()
{
#if defined (DEBUGGER) && defined (DEBUGGER_START_FILE)
int old_errexit;
int r;
old_errexit = exit_immediately_on_error;
exit_immediately_on_error = 0;
maybe_execute_file (DEBUGGER_START_FILE, 1);
function_trace_mode = 1;
r = force_execute_file (DEBUGGER_START_FILE, 1);
if (r < 0)
{
internal_warning ("cannot start debugger; debugging mode disabled");
debugging_mode = function_trace_mode = 0;
}
else
function_trace_mode = 1;
exit_immediately_on_error += old_errexit;
#endif