Skip to content

fix(ext/node): handle raw fd instead rid in isatty#31912

Merged
fraidev merged 4 commits intodenoland:mainfrom
fraidev:handle_isatty_raw_fd
Feb 4, 2026
Merged

fix(ext/node): handle raw fd instead rid in isatty#31912
fraidev merged 4 commits intodenoland:mainfrom
fraidev:handle_isatty_raw_fd

Conversation

@fraidev
Copy link
Copy Markdown
Contributor

@fraidev fraidev commented Jan 21, 2026

Needs:

Previously, isatty(fd) was calling core.isTerminal(fd) which expected a Deno resource ID, but Node.js APIs pass raw OS file descriptors. For fd 0, 1, 2 (stdin/stdout/stderr) this happened to work because rid === fd, but it would fail for higher fds.

@fraidev fraidev changed the title Handle isatty raw fd fix(ext/node): handle raw fd instead rid in isatty Jan 21, 2026
@fraidev fraidev added the ci-draft Run the CI on draft PRs. label Jan 21, 2026
@fraidev fraidev force-pushed the handle_isatty_raw_fd branch from a035d2f to e5d5a92 Compare February 3, 2026 21:41
@fraidev fraidev marked this pull request as ready for review February 4, 2026 17:34
@fraidev fraidev removed the ci-draft Run the CI on draft PRs. label Feb 4, 2026
@fraidev fraidev merged commit f84c762 into denoland:main Feb 4, 2026
22 checks passed
bartlomieju added a commit to bartlomieju/deno that referenced this pull request Mar 28, 2026
This op was added in denoland#31912 but superseded by the libuv-based
TTY.isTTY(fd) rewrite in denoland#32777. It is no longer referenced
anywhere.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bartlomieju added a commit that referenced this pull request Mar 28, 2026
## Summary
- Remove `op_node_is_tty` from `ext/node/ops/util.rs` and its
registration in `ext/node/lib.rs`
- This op was added in #31912 but superseded by the libuv-based
`TTY.isTTY(fd)` rewrite in #32777. It is no longer referenced anywhere.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants