ezkur / yad

Automatically exported from code.google.com/p/yad
GNU General Public License v3.0
0 stars 0 forks source link

Problems with coproc + yad --multi-progress #115

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
At the script below, if I comment the yad line, everything goes OK, otherwise 
an error (that looks like produced by coproc) occurs.

#!/bin/bash
#  Demo of yad + coproc (threads)
coproc proc1 {
    for ((i=1; i<=100; i++))
    { 
        echo 1:$i
        sleep 0.05
    }
}
coproc proc2 {
    for ((j=1; j<=200; j++))
    {
        ((j % 2)) || echo 2:$((j / 2)) 
        sleep 0.05
    }
}
while read -u ${proc1[0]} recebe1 && read -u ${proc2[0]} recebe2
do
    echo $recebe1
    echo $recebe2
done  | yad --multi-progress --bar "Coprocesso 1" --bar "Coprocesso 2"

Original issue reported on code.google.com by julio.ne...@gmail.com on 23 Feb 2012 at 5:44

GoogleCodeExporter commented 8 years ago
coproc is a zsh specific feature

Original comment by ananasik on 23 Feb 2012 at 5:56

GoogleCodeExporter commented 8 years ago
No Ananasik, it's not. It's a bash feature since the release 4.0.

Original comment by julio.ne...@gmail.com on 23 Feb 2012 at 6:37