Hello Folks,
I have been asked to write a test script which can be run by students. the script should have a time limit.
I have almost completed it except the bit of timing!
I've seen something like this:
on_timeout()
{
echo "$USER $score " >> theresult.txt
echo "Time out! Exit..."
exit 3
}
trap 'on_timeout' SIGALRM
#
#the test script goes here
#
#
But I do not know how to set the timer which will send SIGALRM when it goes off
Any help, please
Sultan