aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index 829b787a..0cd1cb23 100644
--- a/main.c
+++ b/main.c
@@ -102,6 +102,7 @@ void toy_exec(char *argv[])
if (!which) return;
toy_init(which, argv);
toys.which->toy_main();
+ if (fflush(NULL) || ferror(stdout)) perror_exit("write");
exit(toys.exitval);
}