Skip to content

Commit

Permalink
Maybe fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Dec 26, 2024
1 parent 9c00d9d commit 953f880
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public void startCapture() {
LOGGER.info("Stopping tracy-capture");

try {
// Send ctrl+c
long pid = process.pid(); // Requires Java 9+
ProcessBuilder killProcess = new ProcessBuilder("kill", "-SIGINT", String.valueOf(pid));
killProcess.inheritIO().start();
try {
// Send ctrl+c
long pid = process.pid(); // Requires Java 9+
ProcessBuilder killProcess = new ProcessBuilder("kill", "-SIGINT", String.valueOf(pid));
killProcess.inheritIO().start();
} catch (Exception e) {
LOGGER.error("Failed to send SIGINT to tracy-capture", e);
}

process.waitFor();
LOGGER.info("tracy-capture finished with exit code {}", process.exitValue());
Expand Down

0 comments on commit 953f880

Please sign in to comment.