fflush after puts to fix piping replay path

This commit is contained in:
dec05eba 2023-10-01 10:06:26 +02:00
parent f89d23c2d0
commit 444a19a087

View File

@ -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) { if(save_replay_thread.valid() && save_replay_thread.wait_for(std::chrono::seconds(0)) == std::future_status::ready) {
save_replay_thread.get(); save_replay_thread.get();
puts(save_replay_output_filepath.c_str()); puts(save_replay_output_filepath.c_str());
fflush(stdout);
std::lock_guard<std::mutex> lock(write_output_mutex); std::lock_guard<std::mutex> lock(write_output_mutex);
save_replay_packets.clear(); save_replay_packets.clear();
} }
@ -2142,6 +2143,7 @@ int main(int argc, char **argv) {
if(save_replay_thread.valid()) { if(save_replay_thread.valid()) {
save_replay_thread.get(); save_replay_thread.get();
puts(save_replay_output_filepath.c_str()); puts(save_replay_output_filepath.c_str());
fflush(stdout);
std::lock_guard<std::mutex> lock(write_output_mutex); std::lock_guard<std::mutex> lock(write_output_mutex);
save_replay_packets.clear(); save_replay_packets.clear();
} }