#! /bin/dash # dash rather than bash so it can be recognized in Windows task manager, # in case it does not stop # put tinytask2w and echokeys1 into PATH ! case "$1" in -) # assume 2 test windows were already started true;; *) # start 2 test windows # use mintty version with compiled-in debug code #./mintty -Rp -o Y=50 -p left > .minpid1 & #./mintty -Rp -o Y=50 -p right > .minpid2 & # use mintty with separate debug program mintty -p left -Rp -o Y=50 echokeys1 > .minpid1 & mintty -p right -Rp -o Y=50 echokeys1 > .minpid2 & ;; esac sleep 2 p1=`tail -1 .minpid1` p2=`tail -1 .minpid2` echo checking $p1 $p2 rm -f .minstop #while ps -p $p1 > /dev/null && ps -p $p2 > /dev/null #while ! [ -f .minstop ] while ps -p $p1 > /dev/null && ps -p $p2 > /dev/null && ! [ -f .minstop ] do # run precompiled TinyTask script to switch the 2 test windows tinytask2w done if [ -f .minstop ] then cat .minstop else echo test window was terminated # e.g. with ^D fi