diff options
author | Rob Landley <rob@landley.net> | 2019-04-16 17:14:11 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-04-16 17:14:11 -0500 |
commit | 362a6177acbaf38c2eac793a88b233cfeebcc5a1 (patch) | |
tree | 6a5964da334bb06f42005ee4ba04f23a8b5280df | |
parent | 2a1f89e5d941a77e8c93ad0a5fe78229a4207d61 (diff) | |
download | toybox-362a6177acbaf38c2eac793a88b233cfeebcc5a1.tar.gz |
Call setlinebuf(stdout) from singleinit, so automatic flush each \n of output.
Commands that want something different can override this, but it seems like
a fairly minor optimization and write(1) exists if we want to micromanage...
-rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -84,6 +84,7 @@ static void toy_singleinit(struct toy_list *which, char *argv[]) toys.argv = argv; if (CFG_TOYBOX_I18N) setlocale(LC_CTYPE, "C.UTF-8"); + setlinebuf(stdout); // Parse --help and --version for (almost) all commands if (CFG_TOYBOX_HELP_DASHDASH && !(which->flags & TOYFLAG_NOHELP) && argv[1]) { |