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] coproc 子进程丢失函数表,DEBUG trap 引用的 preexec 函数报 command not found #441
coproc P { whileread l;doecho"E:$l";done; }
foriin 1 2 3;doecho"m$i">&${P[1]};read -r r <&${P[0]};doneexec {P[1]}>&-
whileread r;doecho"tail:$r";done<&${P[0]}# niu: &63: No such file or directory
Activity
caomengxuan666 commentedon Oct 5, 2026
另见与此同类的 fd 管理差异(本轮 coproc 探针):
coproc P { while read l; do echo "E:$l"; done; } for i in 1 2 3; do echo "m$i" >&${P[1]}; read -r r <&${P[0]}; done exec {P[1]}>&- while read r; do echo "tail:$r"; done <&${P[0]} # niu: &63: No such file or directorybash 正常读出尾行;niu 在关写端后
P[0]失效。两 coproc 并发、读到 EOF、按{P[1]}>&-关写的基本路径已与 bash 一致,差异集中在「loop 多次读 + 关写 + 再收尾」组合上。fix(executor): give coproc children the parent function table snapshot (