equal
deleted
inserted
replaced
152 val out_lines = Future.thread("ssh_stdout") { read_lines(stdout, progress_stdout) } |
152 val out_lines = Future.thread("ssh_stdout") { read_lines(stdout, progress_stdout) } |
153 val err_lines = Future.thread("ssh_stderr") { read_lines(stderr, progress_stderr) } |
153 val err_lines = Future.thread("ssh_stderr") { read_lines(stderr, progress_stderr) } |
154 |
154 |
155 def terminate() |
155 def terminate() |
156 { |
156 { |
157 channel.disconnect |
157 close |
158 out_lines.join |
158 out_lines.join |
159 err_lines.join |
159 err_lines.join |
160 exit_status.join |
160 exit_status.join |
161 } |
161 } |
162 |
162 |
163 val rc = |
163 val rc = |
164 try { exit_status.join } |
164 try { exit_status.join } |
165 catch { case Exn.Interrupt() => terminate(); Exn.Interrupt.return_code } |
165 catch { case Exn.Interrupt() => terminate(); Exn.Interrupt.return_code } |
166 |
166 |
|
167 close |
167 if (strict && rc == Exn.Interrupt.return_code) throw Exn.Interrupt() |
168 if (strict && rc == Exn.Interrupt.return_code) throw Exn.Interrupt() |
168 |
169 |
169 Process_Result(rc, out_lines.join, err_lines.join) |
170 Process_Result(rc, out_lines.join, err_lines.join) |
170 } |
171 } |
171 } |
172 } |