File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
lldb/packages/Python/lldbsuite/test/tools/lldb-dap Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ def read_packet_thread(vs_comm, log_file):
110110 # Wait for the process to fully exit before dumping the log file to
111111 # ensure we have the entire log contents.
112112 if vs_comm .process is not None :
113- vs_comm .process .wait ()
113+ try :
114+ # Do not wait forever, some logs are better than none.
115+ vs_comm .process .wait (timeout = 20 )
116+ except subprocess .TimeoutExpired :
117+ pass
114118 dump_dap_log (log_file )
115119
116120
@@ -1278,7 +1282,11 @@ def terminate(self):
12781282 super (DebugAdapterServer , self ).terminate ()
12791283 if self .process is not None :
12801284 self .process .terminate ()
1281- self .process .wait ()
1285+ try :
1286+ self .process .wait (timeout = 20 )
1287+ except subprocess .TimeoutExpired :
1288+ self .process .kill ()
1289+ self .process .wait ()
12821290 self .process = None
12831291
12841292
You can’t perform that action at this time.
0 commit comments