[Lldb-commits] [lldb] [lldb][windows] handle ENXIO error (PR #181809)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 17 05:29:00 PST 2026
================
@@ -293,6 +293,12 @@ lldb::thread_result_t ThreadedCommunication::ReadThread() {
disconnect = GetCloseOnEOF();
done = true;
}
+ if (error.GetType() == eErrorTypeWin32 && error.GetError() == ENXIO) {
----------------
Nerixyz wrote:
If the error type is win32, we should check for a win32 error code, right? If I understand correctly, then the error comes from [`ConnectionGenericFile::Read`](https://github.com/llvm/llvm-project/blob/0e1cc6138e8e0380e35cda1217df69666f10561d/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp#L163). It's probably not a coincidence, but `ENXIO == 6 == ERROR_INVALID_HANDLE`. So when the PTY is closed, the handle becomes invalid, and we can't read from it anymore.
https://github.com/llvm/llvm-project/pull/181809
More information about the lldb-commits
mailing list