[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 20 03:47:58 PDT 2025
================
@@ -96,7 +115,7 @@ Expected<std::optional<Message>> Transport::Read() {
return createStringError(
formatv("invalid content length {0}", *raw_length).str());
- Expected<std::string> raw_json = ReadFull(*input, length);
----------------
labath wrote:
> Closing a file descriptor does not interrupt in progress reads, I think its platform dependent on what happens.
Very much so. It's also basically impossible to do this in race-free manner,.
> Also, frustrating on Windows stdin is an anonymous pipe and anonymous pipes do not support
I don't know if this helps you (since you still have to use a dedicated API instead of `select(2)`), but `lldb_private::Pipe` works around this by creating a named pipe with an random name (from what I've read, that's actually how windows implements anonymous pipes internally).
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list