diff --git a/shell/ash.c b/shell/ash.c index cc46881c9..ba99381a2 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -3469,6 +3469,7 @@ evalbltin(const struct builtincmd *cmd, int argc, char **argv) { flushall(); cmddone: exitstatus |= ferror(stdout); + clearerr(stdout); commandname = savecmdname; exsig = 0; handler = savehandler;