fix for ssh infinite loop when SSH_SOURCE_BASHRC is defined and bash is run in a comsub in .bashrc; implement posix interp 1009 in posix mode

This commit is contained in:
Chet Ramey
2023-12-04 16:40:00 -05:00
parent 9702b74a28
commit d5ab50bc02
17 changed files with 482 additions and 253 deletions
+7
View File
@@ -8591,6 +8591,13 @@ fatal error if it attempts to unset a @code{readonly} or @code{non-unsettable}
variable, or encounters a variable name argument that is an invalid identifier,
which causes a non-interactive shell to exit.
@item
When asked to unset a variable that appears in an assignment statement
preceding the command, the @code{unset} builtin attempts to unset a variable
of the same name in the current or previous scope as well.
This implements the required "if an assigned variable is further modified
by the utility, the modifications made by the utility shall persist" behavior.
@item
A non-interactive shell exits with an error status if a variable
assignment error occurs when no command name follows the assignment