Commit 2bb800a2 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Explain the -15 magic number. (#7571)

parent 36464ca6
...@@ -182,7 +182,9 @@ class FlutterPlatform extends PlatformPlugin { ...@@ -182,7 +182,9 @@ class FlutterPlatform extends PlatformPlugin {
process.kill(); process.kill();
final int exitCode = await process.exitCode; final int exitCode = await process.exitCode;
subprocessActive = false; 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); String message = _getErrorMessage(_getExitCodeMessage(exitCode, 'after tests finished'), testPath, shellPath);
controller.sink.addError(message); controller.sink.addError(message);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment