CS计算机代考程序代写 //**************************************************************************************************************************************************

//**************************************************************************************************************************************************
#include
#include
#include
#include

void catchint(int signo) {
printf(“\n CATCHINT: signo=%d\n”, signo);
printf(“CATCHINT: returning\n\n”);
}

int main()
{
static struct sigaction act;

void catchint(int);

act.sa_handler = catchint;

sigfillset(&(act.sa_mask));

sigaction(SIGINT, &act, NULL);

printf(“sleep call #1\n”);
sleep(1);
printf(“sleep call #2\n”);
sleep(1);
printf(“sleep call #3\n”);
sleep(1);
printf(“sleep call #4\n”);
sleep(1);
printf(“Exiting \n”);
exit(0);
}