[Lldb-commits] [lldb] [lldb-dap] Make the DAP server resilient against broken pipes (PR #133791)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 31 13:39:43 PDT 2025


ashgti wrote:

A `SIGPIPE` is raised if your process writes a pipe that is closed on the other end. If the python script is getting that then `lldb-dap` must have closed stdin.

The Transport `input` does take ownership of stdin (https://github.com/llvm/llvm-project/blob/main/lldb/tools/lldb-dap/lldb-dap.cpp#L574) so that will be closed once `Transport` is dealloced, but I don't think that would happen unless `main` had already exited.

I think its probably fine to catch this, but the `SIGPIPE` can also happen if you try to write to the FD as well.

https://github.com/llvm/llvm-project/pull/133791


More information about the lldb-commits mailing list