mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-09 05:00:49 +02:00
commit bash-20141121 snapshot
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user