================ @@ -1196,6 +1200,39 @@ def terminate(self): self.process.wait() self.process = None + @classmethod + def launch( + cls, executable: str, /, port=None, unix_socket=None, log_file=None, env=None + ) -> subprocess.Popen: + adaptor_env = os.environ.copy() + if env: + adaptor_env.update(env) + + if log_file: + adaptor_env["LLDBDAP_LOG"] = log_file + + args = [executable] + if port: + args.append("--port") + args.append(str(port)) + elif unix_socket: + args.append("--unix-socket") + args.append(unix_socket) + + proc = subprocess.Popen( + args, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=sys.stdout, + env=adaptor_env, + ) + + if port or unix_socket: + # Wait for the server to startup. + time.sleep(0.1) ---------------- ashgti wrote:
Should be fixed with the new approach. https://github.com/llvm/llvm-project/pull/116392 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits