Hope you can help me to resolve this problem.
For school I have to transform Ctrl+C to a command which doesn't shut down the shell, but he reminds through printf()
that I must type exit to close the shell. I don't even know where to start.
Thank a lot.
Ctrl+C sends an interrupt signal (SIGINT) to the running process.You can use signal() to catch SIGINT like this: