#!/bin/sh gt40() { trap kill_gt40 0 (sleep 3; tools/simh/BIN/pdp11 build/simh/gt40 >gt40.log 2>&1) & GT40="$!" echo "GT40 started, pid $GT40" } kill_gt40() { kill "$GT40" sleep 1 kill -9 "$GT40" echo "GT40 stopped" } while test -n "$1"; do "$1" shift done tools/simh/BIN/pdp10 build/simh/boot