This is the gist the program :
while(true)
{
//bunch of codes that gets data from port ,
//if there is no data it waits here .
}
i am using linux , is there any inbuilt support for keypresses like Ctrl+C . I can catch that using signal(SIGINT, signal_callback_handler);
but Ctrl+C has some problem as it gives errors .
i want to get out of this loop on keypress , is this possible ? If yes , how to do it .