nodejs / nodejs/node

can't execute /dev/stdin on linux

未关闭
#54,200 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

confirmed-bug linux
主要语言
JavaScript
星标
122k
派生
37.4k
平均合并
4 天 3 小时
30 天内合并 PR
272

描述

Version

v22.5.1

Platform
Linux archlinux 6.10.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 27 Jul 2024 16:49:55 +0000 x86_64 GNU/Linux
Subsystem

No response

What steps will reproduce the bug?
printf 'console.log(1)' | node /dev/stdin
How often does it reproduce? Is there a required condition?

every time

What is the expected behavior? Why is that the expected behavior?
1
What do you see instead?
node:fs:453
    return binding.readFileUtf8(path, stringToFlags(options.flag));
                   ^

Error: ENOENT: no such file or directory, open '/proc/2513530/fd/pipe:[611889]'
Additional information

related so problem https://stackoverflow.com/q/77488707/13040423

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 Linux 上复现 printf 'console.log(1)' | node /dev/stdin,并检查针对 /proc/.../fd/pipe:[...] 报告的 node:fs 错误。命令成功执行并输出 1,且符合 issue 中描述的预期行为,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, linux, node.js
领域
cli, operating-systems
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。