Stop unknown coprocessor stats / no output from shell commands. (#1786)

Join the threads and wait for them to finish reading the input/error
streams before returning.
This commit is contained in:
Cameron (3539)
2025-02-17 18:58:16 -05:00
committed by GitHub
parent e97865166d
commit 75c289f526

View File

@@ -145,8 +145,9 @@ public class ShellExec {
exitCode = 0;
if (wait) {
try {
process.waitFor();
exitCode = process.exitValue();
exitCode = process.waitFor();
errorGobbler.join();
outputGobbler.join();
} catch (InterruptedException ignored) {
}
}