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

Reply via email to