Skip to content

read -t 0 consumes the pending input (GNU: non-destructive readiness check) #398

Closed

Description

@caomengxuan666

Summary

read -t 0 consumes the pending input line; GNU uses it as a non-destructive readiness check only.

Reproducer (probe wt37-374 K045)

{ read -t 0 probe; first_status=$?; read value; printf '<%s>:%s:<%s>' "$probe" "$first_status" "$value"; } <<< abc

WSL GNU Bash 5.3.0: <>:0:<abc> - the second read still gets abc.
rubash CLI: <>:0:<> - the input was consumed by the -t 0 check.

GNU owner

builtins/read.def (read_builtin, -t 0 checks readability and returns without consuming).

Artifacts

target/issue-suites/results/wt37-374/run/K045.*

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added a commit that references this issue on Oct 2, 2026
  3. caomengxuan666 commented on Oct 3, 2026

    @caomengxuan666
    MemberAuthor

    Landed on master through the wt38 pool recovery waves (CI green on the batch head); see the issueNNN regression suite and the lane matrices on the ticket trail. Carrier-domain #399 landed with the full true-baseline A/B held byte-identical.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions