diff options
author | Matthias Dienstbier <mdienstbier@googlemail.com> | 2010-03-11 19:46:41 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-03-24 15:44:48 +0100 |
commit | c36ab218239791866daa032545904bbfe14567da (patch) | |
tree | b2efe10a47ec2efcf698e93ee188e4e55b09a6fa | |
parent | be992145a5d868fe1fc9eab1c93c31eb283b2bc7 (diff) |
revert _dia_follow_progress
Bash would wait for the termination of dialog which will never happen because of the command substitution.
This is more or less a revert of commit http://projects.archlinux.org/aif.git/commit/?id=7eeddbe6301fb3979a55f1e74a0a0e16ec566df4,
but only for _dia_follow_progress
-rw-r--r-- | lib-ui.sh | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -419,7 +419,9 @@ _dia_follow_progress () title=$1 logfile=$2 - FOLLOW_PID=$(_dia_dialog --title "$1" --no-kill --tailboxbg "$2" 0 0) + _dia_dialog --title "$1" --no-kill --tailboxbg "$2" 0 0 >$RUNTIME_DIR/aif-follow-pid + FOLLOW_PID=`cat $RUNTIME_DIR/aif-follow-pid` + rm $RUNTIME_DIR/aif-follow-pid # I wish something like this would work. anyone who can explain me why it doesn't get's to be aif contributor of the month. # FOLLOW_PID=`_dia_dialog --title "$1" --no-kill --tailboxbg "$2" 0 0 2>&1 >/dev/null | head -n 1` @@ -427,6 +429,10 @@ _dia_follow_progress () # Also this doesn't work: # _dia_dialog --title "$1" --no-kill --tailboxbg "$2" 0 0 &>/dev/null & # FOLLOW_PID=$! + + # Also the new stdout-stderr-swapping isn't a clean solution for that. When command substitition is used bash will + # wait until the command terminates, dialog's forking to background will fail. + # FOLLOW_PID=$(_dia_dialog --title "$1" --no-kill --tailboxbg "$2" 0 0) } |