The process.exitCode.
process.exitCode
Future<int> get exitCode async => _exitCode ??= await process.exitCode;