anchor.diff:          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}.";
  +        var exitDescription;
  +        if (killedPrematurely) {
  +          exitDescription = "Process was killed prematurely.";
  +        } else {
  +          exitDescription = "Process exited with exit code ${_exitCode.value}";
  +          if (_actualExitTask != _scheduledExitTask) {
  +            var taskString = _actualExitTask.toString();
  +            if (taskString.contains("\n")) {
  +              exitDescription += " in task:\n${prefixLines(taskString)}";
  +            } else {
  +              exitDescription += " in task $taskString";
  +            }
  +          }
  +          exitDescription += ".";
  +        }
  +
           currentSchedule.addDebugInfo(
               "Results of running '$description':\n"
               "$exitDescription\n"
  
positive.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) {
        if (_endExpected) {
          exitCodeCompleter.complete(exitCode);
          return;
        }
  
        wrapFuture(pumpEventQueue().then((_) {
          if (currentSchedule.currentTask != _taskBeforeEnd) return null;
          // If we're one task before the end was scheduled, wait for that task
          // to complete and pump the event queue so that _endExpected will be
          // set.
          return _taskBeforeEnd.result.then((_) => pumpEventQueue());
        }).then((_) {
          exitCodeCompleter.complete(exitCode);
  
          if (!_endExpected) {
            fail("Process '$description' ended earlier than scheduled "
                 "with exit code $exitCode.");
          }
        }), "waiting to reach shouldExit() or kill() for process "
            "'$description'");
      });
    }
  
  
negative.code:       var killedPrematurely = false;
        if (!_exitCode.hasValue) {
          killedPrematurely = true;
          _process.value.kill(ProcessSignal.SIGKILL);
          // Ensure that the onException queue waits for the process to actually
          // exit after being killed.
  