|
28 | 28 | import java.io.BufferedOutputStream;
|
29 | 29 | import java.io.Console;
|
30 | 30 | import java.io.FileDescriptor;
|
| 31 | +import java.io.FileInputStream; |
| 32 | +import java.io.FileOutputStream; |
31 | 33 | import java.io.IOException;
|
32 | 34 | import java.io.InputStream;
|
33 | 35 | import java.io.OutputStream;
|
@@ -2007,9 +2009,16 @@ private static void initPhase1() {
|
2007 | 2009 |
|
2008 | 2010 | lineSeparator = props.getProperty("line.separator");
|
2009 | 2011 |
|
2010 |
| - setIn0(new BufferedInputStream(ConsoleStreams.in)); |
2011 |
| - setOut0(newPrintStream(ConsoleStreams.out, props.getProperty("sun.stdout.encoding"))); |
2012 |
| - setErr0(newPrintStream(ConsoleStreams.err, props.getProperty("sun.stderr.encoding"))); |
| 2012 | + FileInputStream fdIn = new FileInputStream(FileDescriptor.in); |
| 2013 | + FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out); |
| 2014 | + FileOutputStream fdErr = new FileOutputStream(FileDescriptor.err); |
| 2015 | + setIn0(new BufferedInputStream(fdIn)); |
| 2016 | + setOut0(newPrintStream(fdOut, props.getProperty("sun.stdout.encoding"))); |
| 2017 | + setErr0(newPrintStream(fdErr, props.getProperty("sun.stderr.encoding"))); |
| 2018 | + |
| 2019 | +// setIn0(new BufferedInputStream(ConsoleStreams.in)); |
| 2020 | +// setOut0(newPrintStream(ConsoleStreams.out, props.getProperty("sun.stdout.encoding"))); |
| 2021 | +// setErr0(newPrintStream(ConsoleStreams.err, props.getProperty("sun.stderr.encoding"))); |
2013 | 2022 |
|
2014 | 2023 | // Setup Java signal handlers for HUP, TERM, and INT (where available).
|
2015 | 2024 | Terminator.setup();
|
|
0 commit comments