diff --git a/docs/Test-Env.md b/docs/Test-Env.md index 22036a0..1af2bce 100644 --- a/docs/Test-Env.md +++ b/docs/Test-Env.md @@ -12,8 +12,9 @@ Here is the list of test environments. | Windows10 | x64 | gcc | | :warning: | :warning: | :warning: | | Windows10 | arm64 | msvc | | :heavy_check_mark: | :x: | :heavy_check_mark: | | Windows8 | x64 | | | :x: | :warning: | :x: | -| macOS11 | x64 | clang | | :heavy_check_mark: | :x: | :heavy_check_mark: | -| macOS10.15 | x64 | clang | | :heavy_check_mark: | :heavy_check_mark: | :x: | +| macOS14 | arm64 | clang | | :heavy_check_mark: | :x: | :heavy_check_mark: | +| macOS11 | x64 | clang | | :warning: | :x: | :warning: | +| macOS10.15 | x64 | clang | | :warning: | :warning: | :x: | | macOS10.12 | x64 | | | :x: | :warning: | :x: | | Ubuntu20.04 | x64 | gcc | glibc | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | Ubuntu20.04 | arm64 | gcc | glibc | :heavy_check_mark: | :x: | :heavy_check_mark: | @@ -27,4 +28,4 @@ Here is the list of test environments. | OpenBSD7.4 | x64 | clang | | :warning: | :warning: | :warning: | | NetBSD9.3 | x64 | gcc | | :warning: | :warning: | :warning: | | Haiku R1/beta4 | x64 | gcc | | :warning: | :warning: | :x: | -| OpenIndiana 2024.04 | x64 | gcc | | :warning: | :warning: | :x: | +| OpenIndiana 2024.04 | x64 | gcc | | :warning: | :warning: | :warning: | diff --git a/src/exec.cpp b/src/exec.cpp index 495fd76..10df6a4 100644 --- a/src/exec.cpp +++ b/src/exec.cpp @@ -109,7 +109,7 @@ ExecuteResult Execute(const std::string& cmd) { unsigned out_read_size = 0; unsigned err_read_size = 0; - while (subprocess_alive(&process) || out_read_size || err_read_size) { + do { out_read_size = ReadIO(process, READ_STDOUT, out_buf, BUF_SIZE, last_line, BUF_SIZE); err_read_size = ReadIO(process, READ_STDERR, err_buf, BUF_SIZE, err_msg, BUF_SIZE * 2); #ifdef _WIN32 @@ -117,7 +117,7 @@ ExecuteResult Execute(const std::string& cmd) { #else PrintFmt("%s", out_buf); #endif - } + } while (subprocess_alive(&process) || out_read_size || err_read_size); // Sometimes stderr still have unread characters ReadIO(process, READ_STDERR, err_buf, BUF_SIZE, err_msg, BUF_SIZE * 2);