ProcessShellSession class

A ShellSession backed by an OS process started with Process.start.

stdin/stdout/stderr are wired through pipes. This backend does not allocate a real PTY, so resize is a no-op and isatty() is false; the initial geometry is instead conveyed via COLUMNS/LINES environment variables (see ProcessShellBackend). For full terminal semantics and live resize the node uses PtyShellSession, falling back to this backend when no PTY is available.

Implemented types

Constructors

ProcessShellSession(Process _process, {ShellFamily shellFamily = ShellFamily.posix})
Wraps an already-started OS Process launched as shellFamily.

Properties

exitCode Future<int>
Completes with the process exit code once it terminates.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
pid int?
The backend process id, if known.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shellFamily ShellFamily
The command-language family of the launched shell, so the client can speak the matching marker/command dialect over an interactive session.
final
stderr Stream<Uint8List>
Bytes written by the process to standard error.
no setteroverride
stdout Stream<Uint8List>
Bytes written by the process to standard output.
no setteroverride

Methods

closeStdin() Future<void>
Signals end-of-input on standard input (half-close).
override
kill() Future<void>
Forcibly terminates the process and releases resources.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resize({required int cols, required int rows}) → void
Resizes the terminal, where the backend supports it (no-op otherwise).
override
sendSignal(String signal) → void
Sends a POSIX signal name (e.g. SIGINT, SIGTERM) to the process.
override
toString() String
A string representation of this object.
inherited
writeStdin(List<int> data) → void
Writes data to the process's standard input.
override

Operators

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