1217309Snwhitehorn#!/bin/sh 2251843Sbapt# $Id: tailboxbg2,v 1.10 2012/06/29 09:51:11 tom Exp $ 3217309Snwhitehorn 4217309Snwhitehorn. ./setup-vars 5217309Snwhitehorn 6217309Snwhitehorn. ./setup-tempfile 7217309Snwhitehorn 8217309Snwhitehorn./killall listing 9217309Snwhitehorn./listing >listing.out & 10217309Snwhitehorn 11217309Snwhitehorn$DIALOG --title "TAIL BOXES" \ 12217309Snwhitehorn --no-kill \ 13217309Snwhitehorn --begin 10 10 "$@" --tailboxbg listing.out 8 58 \ 14217309Snwhitehorn --and-widget \ 15217309Snwhitehorn --begin 15 15 "$@" --tailboxbg listing.out 8 58 \ 16217309Snwhitehorn --and-widget \ 17217309Snwhitehorn --begin 3 10 "$@" --msgbox "Press OK " 5 30 \ 18217309Snwhitehorn 2>$tempfile 19217309Snwhitehorn 20217309Snwhitehorn# The --and-widget causes a tab to be emitted, but our example will only 21217309Snwhitehorn# write one number to stderr. 22217309Snwhitehornpid=`cat $tempfile |sed -e 's/ //g'` 23217309Snwhitehornif test -n "$pid" ; then 24217309Snwhitehorn# wait a while for the background process to run 25217309Snwhitehornsleep 10 26217309Snwhitehorn 27217309Snwhitehorn# now kill it 28251843Sbaptkill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null 29217309Snwhitehornecho "killed [$pid]" 30217309Snwhitehornfi 31217309Snwhitehorn 32217309Snwhitehorn# ...and the process that is making the listing 33217309Snwhitehorn./killall listing 34