aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 674a41bd3..d1ca3451d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10593,7 +10593,7 @@ preadfd(void)
10593 10593
10594 g_parsefile->next_to_pgetc = buf; 10594 g_parsefile->next_to_pgetc = buf;
10595#if ENABLE_FEATURE_EDITING 10595#if ENABLE_FEATURE_EDITING
10596 retry: 10596 /* retry: */
10597 if (!iflag || g_parsefile->pf_fd != STDIN_FILENO) 10597 if (!iflag || g_parsefile->pf_fd != STDIN_FILENO)
10598 nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1); 10598 nr = nonblock_immune_read(g_parsefile->pf_fd, buf, IBUFSIZ - 1);
10599 else { 10599 else {
@@ -10615,15 +10615,14 @@ preadfd(void)
10615 if (nr == 0) { 10615 if (nr == 0) {
10616 /* ^C pressed, "convert" to SIGINT */ 10616 /* ^C pressed, "convert" to SIGINT */
10617 write(STDOUT_FILENO, "^C", 2); 10617 write(STDOUT_FILENO, "^C", 2);
10618 raise(SIGINT);
10618 if (trap[SIGINT]) { 10619 if (trap[SIGINT]) {
10619 buf[0] = '\n'; 10620 buf[0] = '\n';
10620 buf[1] = '\0'; 10621 buf[1] = '\0';
10621 raise(SIGINT);
10622 return 1; 10622 return 1;
10623 } 10623 }
10624 exitstatus = 128 + SIGINT; 10624 exitstatus = 128 + SIGINT;
10625 bb_putchar('\n'); 10625 return -1;
10626 goto retry;
10627 } 10626 }
10628 if (nr < 0) { 10627 if (nr < 0) {
10629 if (errno == 0) { 10628 if (errno == 0) {