I have to figure out how to write a programming that loops but cannot be exited using CTRL-C for 5 seconds, but after 5 seconds I can use CTRL-C to end the program. I have been reading up on system calls and what not, but I can't figure out where to start. Here are the exact instructions, if someone could point me in the right direction. Thank you.
Write a C program that uses system calls that creates a loop and cannot be killed with control C for five seconds. When it starts out it prints “I’ve started looping and can’t be killed with ^C. . .” Then every second it prints a message that says “Still looping . . .” After five seconds allow the loop to be killed with control C and display the message “I'm still looping but I can be killed with ^C ...” this is displayed every second until the user kills it.