Files
bun.sh/test/regression/issue
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-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-10-20 14:07:31 -07:00
2025-11-05 22:04:14 -08:00
2025-11-05 22:04:14 -08:00
2025-11-19 21:17:51 -08:00
2025-07-20 23:02:10 -07:00