Prevent CTRL+C (and/or CTRL+Z) in a switch

Hello all!

I have written a case switch which acts as the ”menu” for a program I wrote. I have fixed all the error handling (well, that I could think of that is). Now, I would very much want to prevent the user from exiting the program by pressing CTRL+C or CTRL+Z (there is a chioce in the swith that exits the program nice and easy and returns a 0 to main - I want them to use it!).

I Googled on this, but could not find any non OS-dependant solution to this (personally, I am writing on a GNU/Linux system).

So, my humble question to you all is if there is such a thing?

If there is, I will continue digging.

Thanks for reading this,

HMW
I don't think there is a way to do that. Just don't do it. You don't really need it, do you?.. Also, the console isn't really made for stuff like that. Just leave it already and move to making normal applications via some gui toolkit or game engine..
You are right, I don't _need_ it as such. I was mostly curious. Thanks for answering, I appreciate it!

Best,

HMW
Topic archived. No new replies allowed.