WinptyShellSession class
A ShellSession backed by a real Windows pseudo-console allocated through
libwinpty (winpty.dll) via dart:ffi.
winpty exposes the child's console as two named pipes. Because a Win32
HANDLE cannot be awaited on Dart's event loop and ReadFile blocks, the
console output is pumped on a dedicated reader isolate and the child is
reaped on a tiny waiter isolate; raw handle integers are process-global,
so passing them between isolates is safe. Writes (writeStdin) are small and
done synchronously on this isolate.
Unlike the pipe fallback this is a true PTY: cooked-mode readers echo input
(fixing interactive prompts on Windows), full-screen apps render, and
resize actually propagates via winpty_set_size.
- Implemented types
Constructors
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.
no setteroverride
-
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
signalname (e.g.SIGINT,SIGTERM) to the process.override -
toString(
) → String -
A string representation of this object.
inherited
-
writeStdin(
List< int> data) → void -
Writes
datato the process's standard input.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited