[Lldb-commits] [lldb] [lldb][windows] use a marker to drain the ConPTY's init sequence (PR #191472)

via lldb-commits lldb-commits at lists.llvm.org
Sat Apr 11 03:44:49 PDT 2026


================
@@ -252,7 +252,10 @@ llvm::Error PseudoConsole::DrainInitSequences() {
         std::error_code(GetLastError(), std::system_category()),
         "Failed to get the 'COMSPEC' environment variable");
 
-  std::wstring cmdline_str = std::wstring(comspec) + L" /c cls";
+  static constexpr char kDrainMarker[] = "LLDB_CONPTY_DRAIN_DONE";
+  static constexpr wchar_t kDrainMarkerW[] = L"LLDB_CONPTY_DRAIN_DONE";
----------------
Nerixyz wrote:

```suggestion
  static constexpr char s_drain_marker[] = "LLDB_CONPTY_DRAIN_DONE";
  static constexpr wchar_t s_drain_marker_w[] = L"LLDB_CONPTY_DRAIN_DONE";
```

>From https://lldb.llvm.org/resources/contributing.html#coding-style: Static, global and member variables have `s_`, `g_` and `m_` prefixes respectively.

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


More information about the lldb-commits mailing list