aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 481b84138..6b985ad7c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -389,16 +389,7 @@ static void
389flush_stdout_stderr(void) 389flush_stdout_stderr(void)
390{ 390{
391 INT_OFF; 391 INT_OFF;
392 fflush(stdout); 392 fflush_all();
393 fflush(stderr);
394 INT_ON;
395}
396
397static void
398flush_stderr(void)
399{
400 INT_OFF;
401 fflush(stderr);
402 INT_ON; 393 INT_ON;
403} 394}
404 395
@@ -451,7 +442,7 @@ static void
451out2str(const char *p) 442out2str(const char *p)
452{ 443{
453 outstr(p, stderr); 444 outstr(p, stderr);
454 flush_stderr(); 445 flush_stdout_stderr();
455} 446}
456 447
457 448
@@ -8184,7 +8175,7 @@ evaltree(union node *n, int flags)
8184 default: 8175 default:
8185#if DEBUG 8176#if DEBUG
8186 out1fmt("Node type = %d\n", n->type); 8177 out1fmt("Node type = %d\n", n->type);
8187 fflush(stdout); 8178 fflush_all();
8188 break; 8179 break;
8189#endif 8180#endif
8190 case NNOT: 8181 case NNOT:
@@ -9101,7 +9092,7 @@ evalcommand(union node *cmd, int flags)
9101 for (;;) { 9092 for (;;) {
9102 find_command(argv[0], &cmdentry, cmd_flag, path); 9093 find_command(argv[0], &cmdentry, cmd_flag, path);
9103 if (cmdentry.cmdtype == CMDUNKNOWN) { 9094 if (cmdentry.cmdtype == CMDUNKNOWN) {
9104 flush_stderr(); 9095 flush_stdout_stderr();
9105 status = 127; 9096 status = 127;
9106 goto bail; 9097 goto bail;
9107 } 9098 }