================
@@ -4,10 +4,30 @@
 
 import dap_server
 import lldbdap_testcase
+import psutil
+from collections import deque
 from lldbsuite.test import lldbutil
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
+def get_subprocess_pid(process_name):
+    queue = deque([psutil.Process(os.getpid())])
+    while queue:
+        process = queue.popleft()
+        if process.name() == process_name:
+            return process.pid
+        queue.extend(process.children())
+
+    print(f"No subprocess with name {process_name} found", flush=True, 
file=sys.stderr)
+    return None
----------------
walter-erquinigo wrote:

this should be an assert that makes the test fail right away, because that 
child has to exist

https://github.com/llvm/llvm-project/pull/89405
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to