ash: docunebt that "timed out waiting for input" goes to stdout

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko committed 2026-10-11 16:05:24 +02:00
1 parent 049ae38950
commit fcdc004c5c
1 file changed
+6 -6
+6 -6
View File
@@ -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