killForcefully method

Future<int> killForcefully(
  1. Process process, {
  2. bool debugLogging = false,
})

Implementation

Future<int> killForcefully(
  Process process, {
  bool debugLogging = false,
}) {
  final processId = process.pid;
  // Use sigint here instead of sigkill. See
  // https://github.com/flutter/flutter/issues/117415.
  if (debugLogging) {
    print('Sending SIGINT to $processId.');
  }
  Process.killPid(processId, ProcessSignal.sigint);
  return process.exitCode;
}