aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-10-01 10:06:26 +0200
committerdec05eba <dec05eba@protonmail.com>2023-10-01 10:06:26 +0200
commit444a19a08720b9283ed8925697fff839d0306087 (patch)
tree1b6cd4bae045465a4dab4deb79a7bc99fcca57a1
parentf89d23c2d0075dbc8bfaf589634bd75cfad3566c (diff)
fflush after puts to fix piping replay path
-rw-r--r--src/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 68b3c28..688f72a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2121,6 +2121,7 @@ int main(int argc, char **argv) {
if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
save_replay_thread.get();
puts(save_replay_output_filepath.c_str());
+ fflush(stdout);
std::lock_guard<std::mutex> lock(write_output_mutex);
save_replay_packets.clear();
}
@@ -2142,6 +2143,7 @@ int main(int argc, char **argv) {
if(save_replay_thread.valid()) {
save_replay_thread.get();
puts(save_replay_output_filepath.c_str());
+ fflush(stdout);
std::lock_guard<std::mutex> lock(write_output_mutex);
save_replay_packets.clear();
}