Skip to content

[bug] /dev/tcp 对端已关闭时写错误报 EINVAL(GNU 为 EPIPE 语义) #2102

Closed

Description

@caomengxuan666

分歧(PR #2089 分诊附带发现,非 #2042 五面之内)

echo hi > /dev/tcp/<对端已关闭的连接> 时,rubash 报 write error: Invalid argument(EINVAL);GNU 在对端已关闭(closed-peer)形状下是 EPIPE 语义(write error: Broken pipe 一类)。写错误码错位:EINVAL 与 EPIPE 对脚本可见($? 后的诊断文本与 2> 捕获内容不同)。

期望(GNU)

net 写面的错误按真实失败原因映射:对端关闭 → EPIPE;参数/目标非法 → EINVAL,各归其类(与 #2091 已修的 net open 结算口径同批核对)。

归宿

net 重定向批(与 #2098 探针/bind 结算同批)。证据:PR #2089 正文附带项 + D:/repo/nbbuild/pkg10/F/REPORT.md。

Activity

  1. added
    bug
    on Oct 29, 2026
  2. added
    gnu-baseline
    P3-low
    area:fd
    on Oct 29, 2026
  3. added this to the 1.5.0 milestone on Oct 29, 2026
  4. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3-lowarea:fdbuggnu-baseline

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions