2

The following test script:

#!/bin/bash
f() { :; }

while :; do
    coproc f par1
    wait $COPROC_PID
done

floods the console with:

./debug.sh: line 7: warning: execute_coproc: coproc [8740:COPROC] still exists
./debug.sh: line 7: warning: execute_coproc: coproc [8741:COPROC] still exists

That is, wait doesn't wait for the coprocess to terminate.
Bash version is 4.2.0(5)-release. This does not happen with 4.1.5(1)-release.

Do you think it is a bug?

4

1 回答 1

-2

这不是错误。您将 coproc 命名为“f”,因此它位于 $f_PID 之下。

于 2018-02-09T04:46:10.200 回答