================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits