startHelper function

Future<Process> startHelper(
  1. String purpose,
  2. String executable,
  3. List<String> arguments, {
  4. String? device,
  5. String? owner,
  6. HelperLife life = HelperLife.session,
  7. OnRunning onRunning = OnRunning.replace,
  8. String? label,
  9. Map<String, String>? environment,
  10. String? workingDirectory,
})

Starts the long-lived helper for purpose on device through the process registry: one per purpose and device, stopped with its life, reaped by a later glint if this one dies. Like startManaged, an abandoned call stops it until CallProgress.release hands it over.

Implementation

Future<Process> startHelper(
  String purpose,
  String executable,
  List<String> arguments, {
  String? device,
  String? owner,
  HelperLife life = HelperLife.session,
  OnRunning onRunning = OnRunning.replace,
  String? label,
  Map<String, String>? environment,
  String? workingDirectory,
}) async {
  CallProgress.checkAlive();
  final process = await ProcessRegistry.instance.start(
    purpose,
    executable,
    arguments,
    device: device,
    owner: owner,
    life: life,
    onRunning: onRunning,
    environment: environment,
    workingDirectory: workingDirectory,
  );
  return _ownedByCall(process, label ?? describeCommand(executable, arguments));
}