You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] read -t timeout ignored when stdin is a pipe (waits for data; EOF gives rc=1 not 142) #1206
P2-medium中:次要缺陷或边缘路径,排期修复area:readread builtin; stdin/EOF; -n/-N/-d/-t; fd0 ownershipbugSomething isn't workinggnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
GNU bash 5.3.20: rc=142 x=[] (times out after 1s; 128+14).
niu: rc=0 x=[late] (waits ~2s and consumes the delayed line — timeout ignored).
Second case, producer sends nothing:
(sleep 3) | { read -t 1 x;echo"rc=$? x=[$x]"; }
GNU: rc=142 x=[]; niu: rc=1 x=[] (returns only when the pipe closes, then reports plain EOF).
Related to #1141 (TMOUT ignored) but distinct: this is the explicit -t flag, and it also breaks the documented 142 (>128) timeout status, collapsing it into 0/1. TMOUT+-t combined (TMOUT=5; read -t 1 on a slow pipe) diverges the same way, fully explained by this bug plus #1141 — no separate precedence issue found.
Env: niubash 1.4.4 / rubash engine (git 1b14a3d), GNU bash 5.3.20 aarch64-linux-android (Termux) as oracle. Dup-check: searched issues for read -t timeout pipe — no match besides #1141.
P2-medium中:次要缺陷或边缘路径,排期修复area:readread builtin; stdin/EOF; -n/-N/-d/-t; fd0 ownershipbugSomething isn't workinggnu-baselineTracked by the GNU Bash 5.3.0 true-baseline ledger
Activity