Skip to content

Commit 2ea806a

Browse files
committed
Debug windows failure to kill sub-process
1 parent edb1eb2 commit 2ea806a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/runner/java/com/senzing/runner/SnippetRunner.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,11 @@ private static void executeSnippet(String snippet,
322322
// NOTE: using process.destroy() does not trigger the registered
323323
// shutdown hooks in the snippet sub-process for some reason
324324
Process killer = runtime.exec("kill " + process.pid());
325+
Thread killerr = startOutputThread(killer.getErrorStream(), System.err);
326+
Thread killout = startOutputThread(killer.getInputStream(), System.out);
325327
killer.waitFor(); // wait for the kill process to complete
328+
killerr.join();
329+
killout.join();
326330
}
327331
exitValue = process.waitFor();
328332

0 commit comments

Comments
 (0)