Index: Harness.java =================================================================== RCS file: /cvs/mauve/mauve/Harness.java,v retrieving revision 1.16 diff -u -r1.16 Harness.java --- Harness.java 27 Jun 2006 20:53:35 -0000 1.16 +++ Harness.java 30 Jun 2006 23:06:52 -0000 @@ -645,10 +645,10 @@ // to time out. if (runner_watcher != null) runner_watcher.stop(); - runner_watcher = new TimeoutWatcher(runner_timeout); + runner_watcher = new TimeoutWatcher(runner_timeout, runnerProcess); runTest("_confirm_startup_"); runner_watcher.stop(); - runner_watcher = new TimeoutWatcher(runner_timeout); + runner_watcher = new TimeoutWatcher(runner_timeout, runnerProcess); } /** @@ -811,6 +811,9 @@ } catch (IOException e) { + initProcess(harnessArgs); + temp = -1; + break; } } if (temp == -1) @@ -1079,16 +1082,19 @@ private boolean loop = true; private boolean shouldContinue = true; + private final Process runnerProcess; + /** * Creates a new TimeoutWatcher that will wait for millis * milliseconds once started. * @param millis the number of milliseconds to wait before declaring the * test as hung */ - public TimeoutWatcher(long millis) + public TimeoutWatcher(long millis, Process runnerProcess) { millisToWait = millis; watcherThread = new Thread(this); + this.runnerProcess = runnerProcess; } /** @@ -1148,10 +1154,10 @@ // The test is hung, destroy and restart the RunnerProcess. try { - runnerProcess.destroy(); - runner_in.close(); - runner_in_err.close(); - runner_out.close(); + this.runnerProcess.destroy(); + this.runnerProcess.getInputStream().close(); + this.runnerProcess.getErrorStream().close(); + this.runnerProcess.getOutputStream().close(); } catch (IOException e) {