#!/bin/sh TVCON=${TVCON:--2} EXIT=: trap "" QUIT INT TERM started() { EXIT="$EXIT;stop $1 $2" trap "$EXIT" EXIT echo "$1 started, pid $2" } stop() { echo -n "Stopping $1... " kill "$2" 2> /dev/null sleep 2 kill -9 "$2" 2> /dev/null echo "OK" } gt40() { (sleep 3; tools/simh/BIN/pdp11 build/sims/gt40 >gt40.log 2>&1) & started GT40 "$!" } tv11() { (sleep 3; tools/tv11/tv11 -p 10011 localhost >tv11.log 2>&1) & started TV-11 "$!" } tvcon() { (sleep 4; tools/tv11/tvcon/tvcon $TVCON localhost >tvcon.log 2>&1) & started "TV-console" "$!" } while test -n "$1"; do "$1" shift done tools/sims/BIN/ka10 build/sims/run exit 0