#!/bin/csh -f
#
# this shows that multiple interrupts each re-start the interrupt handler
# (which I suppose is the safe, if slow, response to users banging ^C
#  impatiently).
#
echo first sleep, no interrupt handling
sleep 2

onintr tidyup

echo second sleep, with interrupt handling
sleep 10

echo normal ending.
exit 0


tidyup:
echo interrupt handler entered
sleep 5
echo interrupt handler finished.
exit 1
