Skip to content

Commit 4cfabd4

Browse files
committed
Fix --help output not appearing through a pipe
On *nix using a pipe makes the output fully buffered, as opposed to a TTY where the default is line buffering. We did a fast shutdown without flushing so the output could be lost. Fixes #631.
1 parent d68d79d commit 4cfabd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/engine/framework/System.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,11 @@ static void ParseCmdline(int argc, char** argv, cmdlineArgs_t& cmdlineArgs)
739739
"Nothing is read and executed after -connect option and the following URI.\n"
740740
"If another instance is already running, commands will be forwarded to it.\n"
741741
);
742+
FS::FlushAll();
742743
OSExit(0);
743744
} else if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-version") || !strcmp(argv[i], "-v")) {
744745
printf(PRODUCT_NAME " " PRODUCT_VERSION "\n");
746+
FS::FlushAll();
745747
OSExit(0);
746748
} else if (!strcmp(argv[i], "-set")) {
747749
if (i >= argc - 2) {

0 commit comments

Comments
 (0)