'wait $COPROC_PID' doesn't wait
Frage
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?
Keine korrekte Lösung
Andere Tipps
This isn't a bug. You named your coproc "f" so it would be under $f_PID.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow