mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
GP-0: Another attempt to resolve CI hangs.
This commit is contained in:
@@ -16,10 +16,12 @@
|
||||
package ghidra.dbg.testutil;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import ghidra.framework.Application;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
public class DummyProc implements AutoCloseable {
|
||||
public final Process process;
|
||||
@@ -65,11 +67,13 @@ public class DummyProc implements AutoCloseable {
|
||||
.start();
|
||||
|
||||
pid = process.pid();
|
||||
Msg.info(this, "Started dummy process pid = " + pid + ": " + List.of(args));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws Exception {
|
||||
if (!process.destroyForcibly().waitFor(1000, TimeUnit.MILLISECONDS)) {
|
||||
Msg.error(this, "Could not terminate process " + pid);
|
||||
throw new TimeoutException("Could not terminate process " + pid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user