From 897cf54c9f78ab8d44cae62ab694b8893e26b3c7 Mon Sep 17 00:00:00 2001 From: a158 Date: Thu, 7 May 2026 23:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=BE=93=E5=87=BA=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=AE=9E=E6=97=B6=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/fastweb.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/fastweb.cpp b/tests/fastweb.cpp index e67d728..7969fac 100644 --- a/tests/fastweb.cpp +++ b/tests/fastweb.cpp @@ -43,9 +43,10 @@ std::pair execute_command(const std::string& command){ throw std::runtime_error("popen() failed!"); } - // Read the output a line at a time - output it. + // Read and tee to stdout so logs appear as the subprocess writes (not only after exit). while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) { result += buffer.data(); + std::cout << buffer.data() << std::flush; } // Get the return code @@ -264,7 +265,7 @@ void fastweb::uninstall_module(std::string ini_filepath, std::string name) else { std::cout<<"卸载失败:"<