I'm trying to make a C program that can continue running also after a CTRL+C.
I wrote this:
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
void acceptCommands();
void sighandle_int(int sign)
{
//system("^C;./a.out"); *out:* ^Csh: ^C: command not found
// how to protect here the app from being killed?
}
int main(int argc, char **argv)
{
signal(SIGINT, sighandle_int);
acceptCommands();
return 0;
}
how can i do? Thank you