convert TMOUT input timeout handling to use native readline timeouts if readline is being used; change TMOUT SIGALRM processing not to run in a signal handler context to exit; fix for adding multiline commands containing |& to the history list; history -r should not change history_lines_this_session if reading from the history file

This commit is contained in:
Chet Ramey committed 2026-09-08 12:41:47 -04:00
1 parent 81ddb6474b
commit f26caaa178
13 files changed
+261 -16

No files matched your search

+3 -1
View File
@@ -1844,12 +1844,14 @@ yy_stream_get (void)
int result;
result = EOF;
CHECK_INPUT_TIMEOUT;
if (bash_input.location.file)
{
/* XXX - don't need terminate_immediately; stream_getc checks
for terminating signals itself if read returns < 0 */
result = stream_getc (bash_input.location.file);
}
CHECK_INPUT_TIMEOUT;
return (result);
}
@@ -6024,7 +6026,7 @@ reset_readline_prompt (void)
semi-colons. When concatenating multiple lines of history, the
newline separator for such tokens is replaced with a space. */
static const int no_semi_successors[] = {
'\n', '{', '(', ')', ';', '&', '|',
'\n', '{', '(', ')', ';', '&', '|', BAR_AND,
CASE, DO, ELSE, IF, SEMI_SEMI, SEMI_AND, SEMI_SEMI_AND, THEN, UNTIL,
WHILE, AND_AND, OR_OR, IN, DOLPAREN, DOLBRACE,
0