RunningCommandHandle
Category: Core
Source: running_command_handle.dart
An abstract handle to a running command in a runtime.
Implementations live in the strategies layer (e.g. process-backed RunningCommand for host/Docker, HTTP-backed handles for cloud runtimes). Consumers in the harness (ShellJobManager) depend only on this interface so they can manage background jobs uniformly regardless of where the command actually runs.
Classes
abstract RunningCommandHandle
An abstract handle to a running command in a runtime.
Implementations live in the strategies layer (e.g. process-backed RunningCommand for host/Docker, HTTP-backed handles for cloud runtimes). Consumers in the harness (ShellJobManager) depend only on this interface so they can manage background jobs uniformly regardless of where the command actually runs.
Properties
| Property | Type | Description |
|---|---|---|
stdout | Stream<List<int>> get | Stdout bytes from the running command. |
stderr | Stream<List<int>> get | Stderr bytes from the running command. |
exitCode | Future<int> get | Resolves with the process exit code once the command finishes. |
stdout | Stream<List<int>> get | Stdout bytes from the running command. |
stderr | Stream<List<int>> get | Stderr bytes from the running command. |
exitCode | Future<int> get | Resolves with the process exit code once the command finishes. |
Methods
Future<void> kill({bool force = false})
Terminates the running command.
With [force] false (default), sends a polite signal (SIGTERM / graceful cancel). With [force] true, escalates to an immediate kill (SIGKILL / hard-stop). The shutdown path typically calls [kill] once politely, waits briefly, then calls [kill] with force: true for any commands still alive.