Refactor the ProcessExecutor.launch(..) method to register a JRE shutdown hook on the ProcessWrapper representing the forked [Java / JVM] process.

Resolves gh-15.
This commit is contained in:
John Blum
2021-10-28 15:35:18 -07:00
parent 1ef42b374a
commit 92b26c0d50

View File

@@ -114,6 +114,7 @@ public abstract class ProcessExecutor {
ProcessWrapper processWrapper = new ProcessWrapper(process, ProcessConfiguration.create(processBuilder));
processWrapper.register((input) -> System.err.printf("[FORK] - %s%n", input));
processWrapper.registerShutdownHook();
return processWrapper;
}