We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8446c42 commit 3966b50Copy full SHA for 3966b50
mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/ProcessIoProxy.java
@@ -222,6 +222,21 @@ public synchronized void start() {
222
running);
223
}
224
225
+ // Thread to monitor process exit and signal completion
226
+ Thread.ofVirtual()
227
+ .name("process-exit-monitor")
228
+ .start(() -> {
229
+ try {
230
+ process.waitFor();
231
+ } catch (InterruptedException e) {
232
+ LOG.error("Process exit monitor interrupted", e);
233
+ Thread.currentThread().interrupt();
234
+ } finally {
235
+ running.set(false);
236
+ done.countDown();
237
+ }
238
+ });
239
+
240
} catch (IOException e) {
241
running.set(false);
242
throw new RuntimeException("Failed to start process: " + e.getMessage(), e);
0 commit comments