================
@@ -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);
----------------
ashgti wrote:
> 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).
The trouble is that when we run the debugger as an
[DebugAdapterExecutable](https://code.visualstudio.com/api/references/vscode-api#DebugAdapterExecutable)
the input stream is `stdin`. Unless we want to make Windows always use a local
socket
[DebugAdapterServer](https://code.visualstudio.com/api/references/vscode-api#DebugAdapterServer)
or named pipes
[DebugAdapterNamedPipeServer](https://code.visualstudio.com/api/references/vscode-api#DebugAdapterNamedPipeServer)
we'd need to have some other mechanism for supporting reading with a timeout
on Windows.
But I'm also not sure if that actually matters. VSCode never closes stdin, so
it never gets an EOF. When the debug session ends, it sends a `kill -15`
https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/debug/node/debugAdapter.ts#L290-L303
so I'm not sure if we need to ensure the Transport returns, but we do have
an existing test that we shutdown after the `disconnect` request is sent.
https://github.com/llvm/llvm-project/pull/130169
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits