| Index: dart/tools/testing/dart/test_runner.dart
|
| diff --git a/dart/tools/testing/dart/test_runner.dart b/dart/tools/testing/dart/test_runner.dart
|
| index 5029a43f279dc101ee7a277f689077f82f47211f..f7b81862e9b996e97f5aa4046d20828010fea6c6 100644
|
| --- a/dart/tools/testing/dart/test_runner.dart
|
| +++ b/dart/tools/testing/dart/test_runner.dart
|
| @@ -678,7 +678,7 @@ class RunningProcess {
|
| }
|
| // If the timeout fired in between two commands, kill the just
|
| // started process immediately.
|
| - if (timedOut) process.kill();
|
| + if (timedOut) safeKill(process);
|
| });
|
| processFuture.handleException((e) {
|
| print("Process error:");
|
| @@ -691,7 +691,17 @@ class RunningProcess {
|
|
|
| void timeoutHandler(Timer unusedTimer) {
|
| timedOut = true;
|
| - if (process != null) process.kill();
|
| + safeKill(process);
|
| + }
|
| +
|
| + void safeKill(Process p) {
|
| + if (p != null) {
|
| + try {
|
| + p.kill();
|
| + } on ProcessException {
|
| + // Hopefully, this means that the process died on its own.
|
| + }
|
| + }
|
| }
|
| }
|
|
|
|
|