On 9/28/12 6:28 AM, Davide Baldini wrote: > Bash Version: 4.2.0(5)-release (i686-pc-linux-gnu) > > Description: > The following test script floods the console repeating lines similar to: > ./debug.sh: line 7: warning: execute_coproc: coproc [8740:COPROC] > still exists > ./debug.sh: line 7: warning: execute_coproc: coproc [8741:COPROC] > still exists > > I'd expect 'wait $COPROC_PID` to quietly wait without warnings. > This problem doesn't occur with bash 4.1.5(1)-release > (i486-pc-linux-gnu).
Thanks for the report. This is a race condition that was probably uncovered by unrelated changes between bash-4.1 and bash-4.2. The normal sequence of events is fork coproc process populate coproc object with child pid wait for coproc child and reap fill in status in coproc object If the child dies before the parent populates the coproc object with the child pid, the parent won't find the right coproc object and will not mark it as dead. After that, it will populate the coproc with the pid, which will never be marked as dead. The warning is the result. I have fixed the race for the next version. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/