System: fix Windows process pipe busy loop
A synchronous zero-byte pipe read was stored as ready data, leaving communicate_blocking with nothing to wait on and no progress (a spin). Treat a zero-byte read as EOF in both the issue and completion paths. Make the stdout/stderr independence test use cmd.exe syntax on Windows. Wine 11, x86_64-w64-mingw32 GCC 16.2: full VoidTests.exe suite passes (1337 tests, 1323 passed, 14 skipped, 0 failed). Refs #65
This commit is contained in:
1 parent
3939b05396
commit
796609787e
2 files changed
+19
-2
No files matched your search
@@ -94,8 +94,12 @@ Void::Testing::Test run_missing_executable_returns_code_127()
|
||||
|
||||
Void::Testing::Test run_stdout_and_stderr_independent()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
auto r = Void::Process::shell("echo to_stdout & echo to_stderr 1>&2");
|
||||
#else
|
||||
auto r = Void::Process::shell(
|
||||
"echo to_stdout; echo to_stderr >&2");
|
||||
#endif
|
||||
Void::Testing::expect(r.has_value());
|
||||
Void::Testing::expect(r->out.find("to_stdout") != std::string::npos);
|
||||
Void::Testing::expect(r->err.find("to_stderr") != std::string::npos);
|
||||
|
||||
Reference in new issue
Block a user