8238366: CTW runner closes standard output on exit

Reviewed-by: adinn, iignatyev
This commit is contained in:
Aleksey Shipilev 2020-02-10 06:18:10 +01:00
parent ac69c7894d
commit f1a2c6019e

View File

@ -99,9 +99,11 @@ public class CompileTheWorld {
} catch (Throwable t){ } catch (Throwable t){
t.printStackTrace(ERR); t.printStackTrace(ERR);
} finally { } finally {
try { if (OUT != System.out) {
OUT.close(); try {
} catch (Throwable ignore) { OUT.close();
} catch (Throwable ignore) {
}
} }
// <clinit> might have started new threads // <clinit> might have started new threads
System.exit(passed ? 0 : 1); System.exit(passed ? 0 : 1);