Skip to main content

Crate term_sys_io

Crate term_sys_io 

Source
Expand description

§term-sys-io

Low-level cross-platform OS I/O primitives (FD/handle redirection) for term-wm. Not intended for direct use.

Internal crate: the single home for all unsafe process-global FD/handle manipulation —

  • StderrSuppressGuard — a mutex-serialized RAII redirect of stderr to the null device, used to silence arboard/NSPasteboard noise during clipboard writes.
  • redirect_fd / redirect_fd_to_tracing — pipe an OS file descriptor (stdout/stderr) into a callback or tracing.

All three ship Unix, Windows, and no-op fallback implementations.

See the main term-wm crate for documentation. Low-level cross-platform OS I/O primitives for term-wm.

This leaf crate is the single home for all unsafe process-global FD/handle manipulation in the workspace: stderr suppression and pipe-based FD redirection. It sits at the bottom of the dependency graph (libc + tracing only) so term-clipboard, term-wm-pty-engine, term-session-client, and the root package can all depend downward on it without cycles.

Re-exports§

pub use redirect_stdio::redirect_fd;
pub use redirect_stdio::redirect_fd_to_tracing;
pub use stderr_suppress::StderrSuppressGuard;

Modules§

redirect_stdio
Redirect OS-level file descriptors (stdout/stderr) into tracing.
stderr_suppress
OS-level stderr suppression for clipboard backends.