--- a/src/relpipe-tr-awk.cpp Mon May 06 21:57:16 2019 +0200
+++ b/src/relpipe-tr-awk.cpp Mon May 06 23:52:22 2019 +0200
@@ -19,6 +19,7 @@
#include <cstdio>
#include <cstdlib>
#include <memory>
+#include <functional>
#include <relpipe/cli/CLI.h>
#include <relpipe/cli/RelpipeCLIException.h>
@@ -52,10 +53,10 @@
Configuration configuration = cliParser.parse(cli.arguments());
std::shared_ptr<reader::RelationalReader> reader(reader::Factory::create(std::cin));
std::shared_ptr<writer::RelationalWriter> writer(writer::Factory::create(std::cout));
- AwkHandler handler(writer.get(), configuration);
+ AwkHandler handler(writer.get(), std::bind(fflush, stdout), configuration); // std::bind(fflush, XXX) writer::Factory::create(XXX) must be the same stream XXX
reader->addHandler(&handler);
reader->process();
-
+
resultCode = CLI::EXIT_CODE_SUCCESS;
} catch (RelpipeCLIException& e) {