anchor.diff:        throw new StateError("shouldExit() or kill() already called.");
       }
   
  -    _endScheduled = true;
  -    _taskBeforeEnd = currentSchedule.tasks.contents.last;
       schedule(() {
  -      _endExpected = true;
         return _exitCode.then((exitCode) {
           if (expectedExitCode != null) {
             expect(exitCode, equals(expectedExitCode));
           }
         });
       }, "waiting for process '$description' to exit");
  +    _scheduledExitTask = currentSchedule.tasks.contents.last;
     }
   }
  
positive.code:         var stdout = results[0].join("\n");
          var stderr = results[1].join("\n");
  
          var exitDescription = killedPrematurely
              ? "Process was killed prematurely."
              : "Process exited with exit code ${_exitCode.value}.";
          currentSchedule.addDebugInfo(
              "Results of running '$description':\n"
              "$exitDescription\n"
  
negative.code:     // queue where the process will be killed, rather than blocking the tasks
      // queue waiting for the process to exit.
      _process.then((p) => Chain.track(p.exitCode)).then((exitCode) {
        _actualExitTask = currentSchedule.currentTask;
        exitCodeCompleter.complete(exitCode);
      });
    }
  
  