mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-08 11:12:36 +02:00
fix for local variable problem in EXIT trap; add sed-like behavior for null patterns in pattern substitution
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eval.c -- reading and evaluating commands. */
|
||||
|
||||
/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1996-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -90,13 +90,13 @@ reader_loop ()
|
||||
switch (code)
|
||||
{
|
||||
/* Some kind of throw to top_level has occurred. */
|
||||
case FORCE_EOF:
|
||||
case ERREXIT:
|
||||
if (exit_immediately_on_error)
|
||||
reset_local_contexts (); /* not in a function */
|
||||
case FORCE_EOF:
|
||||
case EXITPROG:
|
||||
case EXITBLTIN:
|
||||
current_command = (COMMAND *)NULL;
|
||||
if (exit_immediately_on_error)
|
||||
variable_context = 0; /* not in a function */
|
||||
EOF_Reached = EOF;
|
||||
goto exec_done;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user