diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 78baa9aac..b285e3d33 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -10185,8 +10185,8 @@ preadfd(void) | |||
10185 | if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) | 10185 | if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) |
10186 | nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); | 10186 | nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); |
10187 | else { | 10187 | else { |
10188 | int timeout = -1; | ||
10189 | # if ENABLE_ASH_IDLE_TIMEOUT | 10188 | # if ENABLE_ASH_IDLE_TIMEOUT |
10189 | int timeout = -1; | ||
10190 | if (iflag) { | 10190 | if (iflag) { |
10191 | const char *tmout_var = lookupvar("TMOUT"); | 10191 | const char *tmout_var = lookupvar("TMOUT"); |
10192 | if (tmout_var) { | 10192 | if (tmout_var) { |
@@ -10195,12 +10195,13 @@ preadfd(void) | |||
10195 | timeout = -1; | 10195 | timeout = -1; |
10196 | } | 10196 | } |
10197 | } | 10197 | } |
10198 | line_input_state->timeout = timeout; | ||
10198 | # endif | 10199 | # endif |
10199 | # if ENABLE_FEATURE_TAB_COMPLETION | 10200 | # if ENABLE_FEATURE_TAB_COMPLETION |
10200 | line_input_state->path_lookup = pathval(); | 10201 | line_input_state->path_lookup = pathval(); |
10201 | # endif | 10202 | # endif |
10202 | reinit_unicode_for_ash(); | 10203 | reinit_unicode_for_ash(); |
10203 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout); | 10204 | nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ); |
10204 | if (nr == 0) { | 10205 | if (nr == 0) { |
10205 | /* ^C pressed, "convert" to SIGINT */ | 10206 | /* ^C pressed, "convert" to SIGINT */ |
10206 | write(STDOUT_FILENO, "^C", 2); | 10207 | write(STDOUT_FILENO, "^C", 2); |