Skip to main content

Module pty

Module pty 

Source
Expand description

PTY-backed process APIs.

Re-exports§

pub use backend::PtyChild;
pub use backend::PtyMaster;
pub use backend::PtySize;

Modules§

backend
Cross-platform PTY backend traits and platform-selected implementations. PTY backend abstraction (#150).
reexports
Re-exports for downstream crates that need portable-pty types.
terminal_input
Native terminal input capture and translation helpers.

Structs§

IdleDetectorCore
Core idle detection logic, shareable across threads via Arc. The reader thread calls record_output directly.
IdleMonitorState
Shared mutable state for idle detection waits.
InteractivePtyOptions
Re-exported native PTY process and interactive session types. Safe defaults for a real interactive PTY session.
InteractivePtyPumpResult
Re-exported native PTY process and interactive session types. Output collected by one interactive PTY pump operation.
InteractivePtySession
Re-exported native PTY process and interactive session types. Canonical interactive PTY recipe for downstream Rust consumers.
NativePtyHandles
Platform-neutral handles for a running native PTY child.
NativePtyProcess
Re-exported native PTY process and interactive session types. Low-level native pseudo-terminal process wrapper.
PtyReadShared
Shared reader state paired with a condition variable for waiters.
PtyReadState
Buffered output and close state for a PTY reader thread.

Enums§

PtyError
Errors returned by pseudo-terminal process operations.

Functions§

command_builder_from_argv
Build a portable_pty::CommandBuilder from an argv vector.
control_churn_bytes
Count ANSI/control bytes that should not be treated as visible output.
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.
poll_pty_process
Poll the PTY child process and persist its return code after exit.
portable_exit_code
Convert a portable_pty exit 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.
write_pty_input
Write input bytes to the running PTY after platform-specific translation.