mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
Fixes #22785 The issue was that Bun was saving and restoring terminal settings for all TTY file descriptors at process initialization and exit, even when it never modified them. This could interfere with programs like 'less' that need to control the terminal when receiving piped input. The fix follows libuv's approach: - Only save terminal settings when we actually modify them via Bun__ttySetMode - Don't preemptively save terminal settings at initialization - Only restore settings for file descriptors we actually modified This prevents Bun from interfering with terminal control when stdout is piped to pagers like 'less'. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>