From 953f8801acd9754de80f2af4264e271644b2e7f8 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 26 Dec 2024 15:53:02 +0000 Subject: [PATCH] Maybe fix? --- .../impl/client/gametest/tracy/TracyCapture.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/tracy/TracyCapture.java b/fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/tracy/TracyCapture.java index 461e1e8d40..a587cfbe66 100644 --- a/fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/tracy/TracyCapture.java +++ b/fabric-client-gametest-api-v1/src/client/java/net/fabricmc/fabric/impl/client/gametest/tracy/TracyCapture.java @@ -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());