http://wiki.bash-hackers.org/syntax/keywords/coproc
A coprocess' file descriptors are accessible only to the process from which the coproc
was started.
coprocess 生成 的 fd ,仅能 在运行 coproce 的 shell内 进行访问。
$ coproc awk '{print "foo" $0;fflush()}' [2] 23100 $ while IFS= read -ru ${COPROC[0]} x; do printf '%s\n' "$x"; done & # 这里会出错,这个子进程 不是运行 coproce 的 shell。 [3] 23104