X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=autodlctl;h=6bac7514c677696d89169713bfe6cd9e0b37ddf5;hb=9151870a67acce59580d3f92aa629bd75c95766e;hp=78ef0e697e3b2dc2066d0cb34272305f930ef94c;hpb=07878795a599200feca71c101756de5757b2e8f0;p=utils.git diff --git a/autodlctl b/autodlctl index 78ef0e6..6bac751 100755 --- a/autodlctl +++ b/autodlctl @@ -38,6 +38,9 @@ function getnext fi infofile="$d/.autodl/rtinfo" args=(-e "$fsexpr" -t "$tag $curep" -I "$infofile") + if [ -e "$d/.autodl/wait" ]; then + args=("${args[@]}" -w) + fi if [ -r "$d/.autodl/uarg" ]; then uarg="`cat "$d/.autodl/uarg"`" elif [ -e "$d/.autodl/autouarg" ]; then @@ -182,6 +185,10 @@ while [ "$done" != y ]; do pid="`cat "$HOME/dc/autodl/run/$tag"`" echo "sending SIGUSR1 to $pid" kill -USR1 "$pid" + while [ -e "$HOME/dc/autodl/run/$tag" ]; do + echo "waiting for it to exit" + sleep 1 + done else echo "could not find pid for $tag" fi