From 4f217078ee81d1a37b0868ec50c58d452faa8911 Mon Sep 17 00:00:00 2001 From: vuule Date: Fri, 29 Apr 2022 15:24:18 -0700 Subject: [PATCH] switch to std fflush --- cpp/benchmarks/io/cuio_common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/benchmarks/io/cuio_common.cpp b/cpp/benchmarks/io/cuio_common.cpp index 4f97d4a6333..da64c1bbf3c 100644 --- a/cpp/benchmarks/io/cuio_common.cpp +++ b/cpp/benchmarks/io/cuio_common.cpp @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -146,7 +147,7 @@ std::vector segments_in_chunk(int num_segments, int num_chunks, std::string exec_cmd(std::string_view cmd) { // Prevent the output from the command from mixing with the original process' output - fflush(nullptr); + std::fflush(nullptr); // Switch stderr and stdout to only capture stderr auto const redirected_cmd = std::string{"( "}.append(cmd).append(" 3>&2 2>&1 1>&3) 2>/dev/null"); std::unique_ptr pipe(popen(redirected_cmd.c_str(), "r"), pclose);