Open manipuladordedados opened 8 months ago
Could you provide a code sample with this error?
Could you provide a code sample with this error?
int main()
{
asio::io_context ioc;
asio::readable_pipe pipei{ioc};
asio::writable_pipe pipeo{ioc};
asio::connect_pipe(pipei, pipeo);
pipeo.write_some(asio::buffer(".", 1));
pipeo.close();
char buf[1];
pipei.read_some(asio::buffer(buf));
std::cout << buf[0] << std::endl;
try {
pipei.read_some(asio::buffer(buf));
} catch (const std::exception& e) {
std::cout << e.what() << std::endl;
}
}
Currently, on Windows,
readable_pipe
returnsERROR_BROKEN_PIPE
instead oferror::misc_errors::eof
. This behavior is inconsistent with other platforms.