Hi,
I am writing a program that repeatedly does an operation till Ctrl+C is hit by the user in the Linux terminal. I am programming in C. Any ideas how i can implement this.
I have tested my program by using "for" loops with a condition but now i want to make it run as long as Ctrl+C is hit by the user and interrupted.
What I was thinking was of writing a do while loop like the following
do{ /Computation/ } while(Ctrl+C is not hit)
But i dont know how to check for the Ctrl+C input from the user.
Any suggestions will be appreciated.
Thanks