This bunch of statements is where the signal handler is being setup. The "act.sa_handler=catchsignal;" statement spells out the function that will be used (catchsignal). And the statement signaction(SIGINT,&act,NULL) specifies that values from the act structure are to be associated with the reception of SIGINT.
one more question...how could i get out of the if loop in the statement above. say i want to have another catchsignal...?