Hi,
consider the following script:
======================================================================
#!/bin/bash
job1() {
echo abc
sleep 1
echo def
}
coproc job1
echo ${COPROC[0]}
echo ${COPROC[1]}
( while read i ; do echo $i ; done ) <&${COPROC[0]}
wait
======================================================================
(Most important here is the "${COPROC[0]}" which for me expands to 63 or
similar, a number >10)
Running it:
$ ./test.sh
63
60
./test.sh: line 14: ${COPROC[0]}: Bad file descriptor
$
So COPROC[0] is "63".
Using "<&{COPROC[0]}" (just to make sure I tried everything) instead leads to:
$ ./test.sh
63
60
./test.sh: line 14: {COPROC[0]}: ambiguous redirect
$
Maybe this is related to #423400. Not sure.
Thanks for considering.
bye,
Roland