fixes https://github.com/openwrt/openwrt/issues/23745 upstream had bug bb_got_signal to be never cleared in noninteractive session, this fixes this while waiting for upstream merge. the patch iself is written by Ian Cooper <iancooper@hotmail.com> Signed-off-by: Seo Suchan <tjtncks@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23787 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From 8a7c45305f37bc7138c329d8f7debef8a4c9ddad Mon Sep 17 00:00:00 2001
|
|
From: Seo Suchan <tjtncks@gmail.com>
|
|
Date: Fri, 12 Jun 2026 11:37:18 +0900
|
|
Subject: [PATCH] ash: clear bb_got_signal for non-interactive shell
|
|
|
|
Patch itself origianlly submitted by Ian Cooper <iancooper@hotmail.com>
|
|
|
|
preadfd doesn't run in non-interactive shells, but it can set in non_interactive shells too.
|
|
we always need to clear bb_got_signal otherwise it wll infinite loop.
|
|
clean this flag when ash processes trap as backup.
|
|
|
|
Fixes: #23745
|
|
Upstream-Status: Reported https://github.com/vda-linux/busybox_mirror/issues/16
|
|
Suggested-by: Ian Cooper <iancooper@hotmail.com>
|
|
|
|
Signed-off-by: Seo Suchan <tjtncks@gmail.com>
|
|
---
|
|
shell/ash.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/shell/ash.c b/shell/ash.c
|
|
index fb887f31b..3eb73eaa4 100644
|
|
--- a/shell/ash.c
|
|
+++ b/shell/ash.c
|
|
@@ -9608,6 +9608,9 @@ dotrap(void)
|
|
savestatus = status;
|
|
}
|
|
pending_sig = 0;
|
|
+#if ENABLE_FEATURE_EDITING
|
|
+ bb_got_signal = 0;
|
|
+#endif
|
|
barrier();
|
|
|
|
TRACE(("dotrap entered\n"));
|