ShellJob class abstract interface

A detached shell job: a process that keeps running after the tool call that started it has returned. Output is appended to the job's log file (the path is chosen by the caller of BackgroundShell.startShellJob).

Properties

command String
The command line being executed.
no setter
exitCode int?
The process exit code, or null while isRunning.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Registry-unique job id.
no setter
isRunning bool
Whether the process is still running.
no setter
logPath String
The log file receiving the job's stdout and stderr.
no setter
output Stream<String>
Live decoded output (stdout + stderr interleaved) as it is produced, in addition to the log file. Broadcast: any number of listeners; no buffering for listeners that attach after a chunk was emitted.
no setter
pid int?
The job's root process id, when the platform exposes one (null on sandboxed shells). Persisted in the cross-run job manifest so a later boot can sweep the job's leftover process group (issue #517).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settled Future<void>
Completes when the process exits (naturally, killed, or timed out).
no setter
stopReason String?
Why the job was stopped early: 'timeout' (ShellExecOptions.timeout) or 'cancelled' (ShellExecOptions.cancelToken); null when the process exited on its own (or is still running).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stop() Future<void>
Terminates the process. No-op when it already exited.
toString() String
A string representation of this object.
inherited
writeStdin(String data) bool
Writes data to the job's stdin (issue #367: answering a detected password ask). Returns false when the stdin pipe is closed (the default: stdin closes right after start) or the process is already gone — never throws.

Operators

operator ==(Object other) bool
The equality operator.
inherited