aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/sed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 00dde60be..6179c5e80 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1648,6 +1648,11 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
1648 fchown(nonstdoutfd, statbuf.st_uid, statbuf.st_gid); 1648 fchown(nonstdoutfd, statbuf.st_uid, statbuf.st_gid);
1649 1649
1650 process_files(); 1650 process_files();
1651 fflush(G.nonstdout);
1652 if (ferror(G.nonstdout)) {
1653 xfunc_error_retval = 4; /* It's what gnu sed exits with... */
1654 bb_simple_error_msg_and_die(bb_msg_write_error);
1655 }
1651 fclose(G.nonstdout); 1656 fclose(G.nonstdout);
1652 G.nonstdout = stdout; 1657 G.nonstdout = stdout;
1653 1658