Skip to main content

Module redirect_stdio

Module redirect_stdio 

Source
Expand description

Redirect OS-level file descriptors (stdout/stderr) into tracing.

macOS system frameworks (AppKit, NSPasteboard) and C libraries often write debug output directly to FD 1 or 2. When the terminal is in raw/alt-screen mode this junk leaks to the display. These helpers pipe the FD through a background thread into tracing. (The StderrSuppressGuard — a short-lived null-device redirect for arboard — lives in this crate’s sibling stderr_suppress module.)

Functions§

redirect_fd
Redirect an OS-level file descriptor into a callback.
redirect_fd_to_tracing
Convenience wrapper: redirects an FD and feeds lines into tracing.