normalizeExitCode function

int normalizeExitCode(
  1. int exitCode
)

Converts an exit code from a process killed by a signal (reported by Dart as -signal) to the shell convention of 128 + signal.

Implementation

int normalizeExitCode(int exitCode) =>
    exitCode < 0 ? 128 + exitCode.abs() : exitCode;