14c8945a0SNathan Whitehorn#!/bin/sh 2*a96ef450SBaptiste Daroussin# $Id: tailboxbg2,v 1.11 2019/12/11 00:11:51 tom Exp $ 34c8945a0SNathan Whitehorn 44c8945a0SNathan Whitehorn. ./setup-vars 54c8945a0SNathan Whitehorn 64c8945a0SNathan Whitehorn. ./setup-tempfile 74c8945a0SNathan Whitehorn 84c8945a0SNathan Whitehorn./killall listing 94c8945a0SNathan Whitehorn./listing >listing.out & 104c8945a0SNathan Whitehorn 114c8945a0SNathan Whitehorn$DIALOG --title "TAIL BOXES" \ 124c8945a0SNathan Whitehorn --no-kill \ 134c8945a0SNathan Whitehorn --begin 10 10 "$@" --tailboxbg listing.out 8 58 \ 144c8945a0SNathan Whitehorn --and-widget \ 154c8945a0SNathan Whitehorn --begin 15 15 "$@" --tailboxbg listing.out 8 58 \ 164c8945a0SNathan Whitehorn --and-widget \ 174c8945a0SNathan Whitehorn --begin 3 10 "$@" --msgbox "Press OK " 5 30 \ 184c8945a0SNathan Whitehorn 2>$tempfile 194c8945a0SNathan Whitehorn 204c8945a0SNathan Whitehorn# The --and-widget causes a tab to be emitted, but our example will only 214c8945a0SNathan Whitehorn# write one number to stderr. 22*a96ef450SBaptiste Daroussinpid=`sed -e 's/ //g' $tempfile` 234c8945a0SNathan Whitehornif test -n "$pid" ; then 244c8945a0SNathan Whitehorn# wait a while for the background process to run 254c8945a0SNathan Whitehornsleep 10 264c8945a0SNathan Whitehorn 274c8945a0SNathan Whitehorn# now kill it 28*a96ef450SBaptiste Daroussinkill "-$SIG_QUIT" "$pid" 2>&1 >/dev/null 2>/dev/null 294c8945a0SNathan Whitehornecho "killed [$pid]" 304c8945a0SNathan Whitehornfi 314c8945a0SNathan Whitehorn 324c8945a0SNathan Whitehorn# ...and the process that is making the listing 334c8945a0SNathan Whitehorn./killall listing 34