Here's my handler:
ok, a couple of things:Code:void handle_INT ()
{
printf ("An interrupt has occured...\n");
printf ("\n\n\n\n\n\n\n\n\n");
longjmp (jmp, 1);
}
- I want to reuse the old handler so i have to save the return value of signal. I try to save it in sig (of type struct sighandler_t) and i get "sig has incompatible type". I can't change the handler's return type since a return type of struct sighandler_t gives me incompatible type for arg2 of signal. What do i do?
-i am not using longjmp to get out of a loop. My shell proceses the commands and then exectues them. If it encounters a SIGINT during the processing, it needs to clear the command line and reask the user to enter a command. So i ahev to go back to the start of the main loop inorder to re-ask the user to...
The problem is the instructor gave me these notes and tutorials, so i'm guessing they must be enough. You guys are talking about standards which i have no clue about.