[git commit] ash: docunebt that "timed out waiting for input" goes to stdout
Denys Vlasenko
vda.linux at googlemail.com
Sun Oct 11 14:05:24 UTC 2026
commit: https://git.busybox.net/busybox/commit/?id=fcdc004c5c167f282ce16891e16b4cc330ec3859
branch: https://git.busybox.net/busybox/log/?h=master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index 2342806d9..16d82ab21 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11563,21 +11563,21 @@ preadfd(void)
goto again;
}
if (nr < 0) {
- if (errno == 0) {
- /* ^D pressed */
- nr = 0;
- }
- else if (errno == EINTR) { /* got signal? */
+ if (errno == EINTR) { /* got signal? */
if (bb_got_signal != SIGINT)
write(STDERR_FILENO, "\n", 1);
goto empty_line_input;
}
# if ENABLE_ASH_IDLE_TIMEOUT
- else if (errno == EAGAIN && timeout > 0) {
+ if (errno == EAGAIN && timeout > 0) { /* bash 5.3.9 writes thsi to stdout, not stderr */
puts("\007timed out waiting for input: auto-logout");
exitshell();
}
# endif
+ if (errno == 0) {
+ /* ^D pressed */
+ nr = 0;
+ }
}
}
#else
More information about the busybox-cvs
mailing list