Files
bun.sh/src/bun.js/bindings
Claude Bot ca76f01bb5 Fix terminal mode interference when piping to less
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>
2025-09-19 04:28:28 +00:00
..
2025-06-16 14:01:58 -07:00
2025-05-22 21:12:43 -07:00
2025-09-13 14:52:19 -07:00
2025-04-21 23:28:03 -07:00
2025-07-30 15:49:15 -07:00
2025-07-26 21:59:21 -07:00
2025-07-30 15:49:15 -07:00
2025-02-12 22:08:53 -08:00
2025-03-10 20:19:29 -07:00
2025-09-11 17:53:06 -07:00
2025-06-16 14:01:58 -07:00
2025-05-22 21:12:43 -07:00
2025-07-30 15:49:15 -07:00
2025-03-26 20:51:20 -07:00
2025-05-22 21:12:43 -07:00
2025-07-30 15:49:15 -07:00
2025-03-26 20:51:20 -07:00
2025-02-12 22:08:53 -08:00
2025-02-12 22:08:53 -08:00
2025-05-16 23:17:35 -07:00
2025-03-26 20:51:20 -07:00
2025-07-21 13:26:47 -07:00
2025-05-22 21:12:43 -07:00
2025-09-09 23:31:07 -07:00
2025-05-09 19:49:52 -07:00
2025-04-21 23:28:03 -07:00
2025-09-01 16:20:13 -07:00
2025-07-02 20:06:43 -07:00
2025-07-02 20:06:43 -07:00
2025-07-30 15:49:15 -07:00
2025-03-20 00:45:44 -07:00
2025-03-20 00:45:44 -07:00
2025-03-20 00:45:44 -07:00
2025-07-30 15:49:15 -07:00
2025-02-12 22:08:53 -08:00
2025-05-22 21:12:43 -07:00
2025-07-30 15:49:15 -07:00
2025-02-12 22:08:53 -08:00
2025-09-09 23:31:07 -07:00
2025-09-13 14:52:19 -07:00
2025-02-12 22:08:53 -08:00
2025-02-12 22:08:53 -08:00
2025-08-23 00:31:53 -07:00
2025-02-12 22:08:53 -08:00
2025-07-23 22:31:42 -07:00
2025-03-31 04:20:52 -07:00
2025-08-12 19:59:34 -07:00
2025-05-28 17:04:37 -07:00
2025-05-28 17:04:37 -07:00
2025-03-31 02:15:27 -07:00
2025-03-31 02:15:27 -07:00
2025-03-10 20:19:29 -07:00
2025-08-23 00:31:53 -07:00
2025-08-04 19:42:40 -07:00
2025-08-04 19:42:40 -07:00
2025-01-03 13:57:46 -08:00
2025-02-12 22:08:53 -08:00
2025-08-01 15:07:51 -07:00
2025-01-03 19:11:48 -08:00
2025-08-23 06:57:00 -07:00
2025-01-03 19:11:48 -08:00
2025-08-14 22:42:05 -07:00
2025-08-14 22:42:05 -07:00
2025-05-22 21:12:43 -07:00
2025-02-12 22:08:53 -08:00
2025-08-31 18:27:51 -07:00
2025-09-13 14:52:19 -07:00
2025-07-30 15:49:15 -07:00