src/relpipe-in-x11.cpp
branchv_0
changeset 3 72384bb5c66e
parent 0 3493d6e7016e
child 12 b291a7db2d39
--- a/src/relpipe-in-x11.cpp	Sat Mar 27 00:29:10 2021 +0100
+++ b/src/relpipe-in-x11.cpp	Sun Mar 28 21:11:43 2021 +0200
@@ -16,6 +16,7 @@
  */
 #include <cstdlib>
 #include <memory>
+#include <functional>
 
 #include <relpipe/writer/RelationalWriter.h>
 #include <relpipe/writer/RelpipeWriterException.h>
@@ -46,7 +47,7 @@
 		Configuration configuration = cliParser.parse(cli.arguments());
 		X11Command command;
 		std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
-		command.process(configuration, writer);
+		command.process(configuration, writer, std::bind(fflush, stdout)); // std::bind(fflush, XXX) Factory::create(XXX) must be the same stream XXX
 		resultCode = CLI::EXIT_CODE_SUCCESS;
 	} catch (RelpipeWriterException& e) {
 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());