C signal handler getting activated by all child processes
问题 I need some kind of signal_handler that when pressed CTRL+C, the program pauses all it's operations and asks the user: «Are you sure you want to terminate(Y/N)?» If the answer is y, the program terminates, if it's n the program continues/prooceeds with it's functions, this is what i have till this moment: void sig_handler(int sig){ if(sig == SIGINT){ char res; printf("\nAre you sure you want to terminate (Y/N)?\n"); kill(0, SIGTSTP); //envia sinal Stop ao processo pai do{ read(STDIN_FILENO,