Skip to content

[bug] Failed-exec diagnostic dropped under 2>&1 dup redirect #1144

Closed

Description

@caomengxuan666

[bug] Failed-exec diagnostic dropped under dup-style redirect (2>&1), rc unaffected

exec nosuchcmd_xyz 2>&1; echo after
# GNU bash 5.3:  message `exec: nosuchcmd_xyz: not found` on stdout (redirect honored), rc=127, no AFTER (aborts)
# niu:           message nowhere (stdout and stderr both empty), rc=127, no AFTER

Clean exec fail (no redirect) and exec fail 2>file are identical in both — only the dup variant drops it. Proximity note: #934 (closed) covered open-failure diag routing incl. exec 2>; this is the dup-redirect leftover on the exec-fail path. Low: message loss only.

Env: niubash 1.4.4 / rubash engine (master ~2026-10), GNU bash 5.3.20 aarch64-linux-android as oracle.

Activity

  1. added
    bug
    gnu-baseline
    area:fd
    P3-low
    on Oct 22, 2026
  2. caomengxuan666 commented on Oct 23, 2026

    @caomengxuan666
    MemberAuthor

    FIXED-BY-#1181 — verified on master (263ce53f). Commit 361a320.

    exec nosuchcmd_xyz 2>&1; echo after → exec: nosuchcmd_xyz: not found on stdout, rc=127, no after. Identical to GNU 5.3.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowarea:fdbuggnu-baseline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions