Explain the -15 magic number. (#7571)

This commit is contained in:
Ian Hickson
2017-01-20 16:44:26 -08:00
committed by GitHub
parent 36464ca659
commit 2bb800a2e4

View File

@@ -182,7 +182,9 @@ class FlutterPlatform extends PlatformPlugin {
process.kill();
final int exitCode = await process.exitCode;
subprocessActive = false;
if (!controllerSinkClosed && exitCode != -15) {
if (!controllerSinkClosed && exitCode != -15) { // ProcessSignal.SIGTERM
// We expect SIGTERM (15) because we tried to terminate it.
// It's negative because signals are returned as negative exit codes.
String message = _getErrorMessage(_getExitCodeMessage(exitCode, 'after tests finished'), testPath, shellPath);
controller.sink.addError(message);
}