Thanks, worked like a charm.
One thing though, I compiled it in debug mode with g++, and when I went through the thing with gdb, it would not step into
Code:
signal( SIGINT, ctrlc_handler );
Also, my loop was set up like this:
Code:
while(!ctrlc_pressed){
std::cout << ">>> ";
std::getline(std::cin, str_dump);
std::cout << str_dump << std::endl;
}
And obviously, when I try to check what happens when I press "^C", it ends up triggering the SIGINT for gdb and not my program. So is there a way to get inside what's happening? Or do I just have to read "signal.h"?