代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/bash 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 09c32bc946baad7364b30abb491f72f7728b56d9 Mon Sep 17 00:00:00 2001
From: Chet Ramey <[email protected]>
Date: Tue, 10 Oct 2023 12:00:19 -0400
Subject: [PATCH] fix for @E transformation; fixes for failures in arith for
and for commands; style changes to man page; fix for bug in read builtin if
it assigns to IFS
Conflict:partial round, only the modified content of execute_cmd.c is rounded.
Reference:https://git.savannah.gnu.org/cgit/bash.git/commit/?id=09c32bc946baad7364b30abb491f72f7728b56d9
---
execute_cmd.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/execute_cmd.c b/execute_cmd.c
index a855376..71d147c 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -2837,8 +2837,11 @@ execute_for_command (for_command)
#endif
save_line_number = line_number;
+ line_number = for_command->line; /* for expansion error messages */
+
if (check_identifier (for_command->name, 1) == 0)
{
+ line_number = save_line_number;
if (posixly_correct && interactive_shell == 0)
{
last_command_exit_value = EX_BADUSAGE;
@@ -2850,7 +2853,6 @@ execute_for_command (for_command)
loop_level++;
identifier = for_command->name->word;
- line_number = for_command->line; /* for expansion error messages */
list = releaser = expand_words_no_vars (for_command->map_list);
begin_unwind_frame ("for");
@@ -3075,13 +3077,8 @@ execute_arith_for_command (arith_for_command)
/* Evaluate the initialization expression. */
expresult = eval_arith_for_expr (arith_for_command->init, &expok);
- if (expok == 0)
- {
- line_number = save_lineno;
- return (EXECUTION_FAILURE);
- }
- while (1)
+ while (expok)
{
/* Evaluate the test expression. */
line_number = arith_lineno;
@@ -3089,10 +3086,8 @@ execute_arith_for_command (arith_for_command)
line_number = save_lineno;
if (expok == 0)
- {
- body_status = EXECUTION_FAILURE;
- break;
- }
+ break;
+
REAP ();
if (expresult == 0)
break;
@@ -3120,18 +3115,12 @@ execute_arith_for_command (arith_for_command)
line_number = arith_lineno;
expresult = eval_arith_for_expr (arith_for_command->step, &expok);
line_number = save_lineno;
-
- if (expok == 0)
- {
- body_status = EXECUTION_FAILURE;
- break;
- }
}
loop_level--;
line_number = save_lineno;
- return (body_status);
+ return (expok ? body_status : EXECUTION_FAILURE);
}
#endif
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。