wok-6.x rev 17455
syslinux/iso2exe: avoid a possible deadlock in progress bar
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Dec 18 12:32:12 2014 +0100 (2014-12-18) |
parents | aa3f469a31d7 |
children | 7cb58ceb1fb0 |
files | syslinux/stuff/iso2exe/init |
line diff
1.1 --- a/syslinux/stuff/iso2exe/init Thu Dec 18 11:42:27 2014 +0100 1.2 +++ b/syslinux/stuff/iso2exe/init Thu Dec 18 12:32:12 2014 +0100 1.3 @@ -521,14 +521,13 @@ 1.4 1.5 # perform dd in progess bar 1.6 max=$(($(stat -c %s /mnt/$ISO)/1024/1024)) 1.7 - mkfifo /tmp/fifodd 1.8 - dialog --gauge " The ISO image transfer can be long. Please wait..." \ 1.9 - 6 70 0 < /tmp/fifodd & 1.10 i=0; ddq if=/mnt/$ISO bs=1024k | ( 1.11 - while ddq bs=1024k count=1 ; do 1.12 + while ddq bs=1024k count=1 ; do 1.13 i=$(($i + 1)) 1.14 [ $i -gt $max ] && break 1.15 - echo $((($i*100)/$max)) > /tmp/fifodd 1.16 + echo $((($i*100)/$max)) | dialog --gauge \ 1.17 + " The ISO image transfer can be long. Please wait..." \ 1.18 + 6 70 0 > /dev/tty 2>&1 1.19 done ) > $device 1.20 1.21 # partition + fat32 format for the remining space 1.22 @@ -551,10 +550,6 @@ 1.23 losetup -d /dev/loop0 1.24 fi 1.25 fi ; } 1.26 - 1.27 - # kill dialog --gauge 1.28 - sleep 1 1.29 - rm /tmp/fifodd 1.30 } 1.31 1.32 usbkey()