For some reason, it seems like stderr is being sent to stdout in the following bash script:
exec > >( while read line; do echo " stdout: $line"; done )
exec 2> >( while read line; do echo " stderr: $line"; done )
echo "rolo"
echo "cholo" >&2
if you run that, the output is so:
stdout: rolo
stdout: stderr: cholo
Does anyone know why that's happening? As far as I can tell, what's happening is that the stderr is being sent to stdout, that's why the first line is capturing the output from the second line?