Files
bun.sh/src
Claude Bot 820f7aa74a fix(tty): prevent tty.ReadStream from closing caller-owned PTY fds
When node-pty (or other PTY libraries) passes a PTY master fd to
tty.ReadStream, Bun's implementation would:

1. Auto-close the fd when the stream was destroyed, closing the fd
   that node-pty still owned
2. Treat EAGAIN errors from non-blocking PTY reads as fatal, destroying
   the stream prematurely

This caused the shell process to receive SIGHUP because the PTY master
was unexpectedly closed.

Changes:
- Set autoClose: false in tty.ReadStream when an fd is provided
- Handle EAGAIN in fs.ReadStream._read() by retrying instead of
  destroying the stream

Fixes #25822

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 11:37:49 +00:00
..
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-23 22:24:18 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-25 14:00:58 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-10-04 02:17:55 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-23 22:24:18 -08:00
2025-11-25 11:06:24 -08:00
2025-11-10 14:38:26 -08:00
2026-01-07 12:33:21 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-09-09 20:41:10 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00