Expand description
PTY-backed process APIs.
Modules§
- backend
- Cross-platform PTY backend traits and platform-selected implementations.
Host-neutral PTY facade owned by
running-process-platform-internal. - reexports
Deprecated - Compatibility re-exports for downstream crates using the pre-boundary PTY API.
- terminal_
input - Native terminal input capture and translation helpers. Native terminal input capture routed through the platform boundary.
Structs§
- Child
Process Info - Information about a child process found via Toolhelp snapshot.
- Idle
Detector Core - Core idle detection logic, shareable across threads via Arc.
The reader thread calls
record_outputdirectly. - Idle
Monitor State - Shared mutable state for idle detection waits.
- Interactive
PtyOptions - Re-exported native PTY process and interactive session types. Safe defaults for a real interactive PTY session.
- Interactive
PtyPump Result - Re-exported native PTY process and interactive session types. Output collected by one interactive PTY pump operation.
- Interactive
PtySession - Re-exported native PTY process and interactive session types. Canonical interactive PTY recipe for downstream Rust consumers.
- Native
PtyHandles - Native
PtyProcess - Re-exported native PTY process and interactive session types. Low-level native pseudo-terminal process wrapper.
- Orphan
Conhost Info - A conhost.exe process whose parent is no longer alive — likely an orphan from a dead ConPTY session.
- PtyRead
Shared - Shared reader state paired with a condition variable for waiters.
- PtyRead
State - Buffered output and close state for a PTY reader thread.
- PtySize
- Re-exported PTY backend handles and size type. Caller-facing PTY dimensions.
Enums§
- ConPty
Backend Kind - Reports whether the process-wide ConPTY API table resolved to the
system
kernel32.dllor to a sidecarconpty.dll. See #443. - PtyError
- Errors returned by pseudo-terminal process operations.
Traits§
- PtyChild
- Re-exported PTY backend handles and size type. Platform-neutral handle for a child process running inside a PTY.
- PtyMaster
- Re-exported PTY backend handles and size type. Platform-neutral handle for the master side of a pseudo-terminal.
Functions§
- command_
builder_ from_ argv Deprecated - Build a
portable_pty::CommandBuilderfrom an argv vector. - control_
churn_ bytes - Count ANSI/control bytes that should not be treated as visible output.
- current_
backend_ kind - Reports whether the process-wide ConPTY API table resolved to the
system
kernel32.dllor to a sidecarconpty.dll. See #443. - find_
child_ processes - Find all direct child processes of a given parent PID using the Windows Toolhelp API. Returns PID and process name for each child.
- find_
orphan_ conhosts - Scan all conhost.exe processes on the system and return those whose parent process is no longer alive. These are likely orphans from dead ConPTY sessions.
- input_
contains_ newline - Return whether input bytes contain a carriage return or newline.
- is_
ignorable_ process_ control_ error - Return whether a process-control error can be ignored during cleanup.
- platform_
shell_ argv - Build an argv for the selected host shell.
- poll_
pty_ process - Poll the PTY child process and persist its return code after exit.
- portable_
exit_ code Deprecated - Convert a
portable_ptyexit status into this crate’s signed exit-code convention. - record_
pty_ input_ metrics - Record PTY input byte, newline, and submit counters for one input chunk.
- spawn_
pty_ reader - Spawn the background reader that drains PTY output into shared state.
- store_
pty_ returncode - Store the PTY child return code in shared process state.
- wait_
before_ close_ supported - Whether this host can observe child exit before closing the PTY master.
- windows_
terminal_ input_ payload - Translate newline bytes into the Windows PTY input payload format.
- write_
pty_ input - Write input bytes to the running PTY after platform-specific translation.
Type Aliases§
- Shared
PtyWriter - Platform-neutral handles for a running native PTY child.
Independently-lockable PTY input writer (issue #590, cluster D). Kept
separate from the
handlesmutex so a blocking write never holds that lock — see the field docs onNativePtyHandles::writer. - Windows
JobHandle - Compatibility name for the host-owned PTY process-tree guard.