Added debugging for bf emulator trouble

This commit is contained in:
jdf
2010-02-27 19:13:19 +00:00
parent 74add1680e
commit b813e6dabd
2 changed files with 12 additions and 1 deletions
@@ -31,5 +31,16 @@ class EmulatorController {
// make sure that the streams are drained properly
new StreamPump(p.getInputStream()).addTarget(System.out).start();
new StreamPump(p.getErrorStream()).addTarget(System.err).start();
new Thread(new Runnable() {
public void run() {
try {
System.err.println("Starting to wait for emulator process.");
final int result = p.waitFor();
System.err.println("Emulator process exited with " + result);
} catch (final InterruptedException e) {
System.err.println("Emulator interrupted.");
}
}
});
}
}
@@ -79,7 +79,7 @@ class StreamPump implements Runnable {
}
}
private class WriterLineProcessor implements LineProcessor {
private static class WriterLineProcessor implements LineProcessor {
private final PrintWriter writer;
private WriterLineProcessor(final OutputStream out) {