okay, so I use sighandler to interpret some signal, for that it is ctrl-c, so when ctrl-c is typed, some action will be taken, and everything is fine and dandy, but what I really need is this happened without ^ c appearing on input / output
for example let's say i have this code
#include <stdio.h> #include <stdlib.h> #include <signal.h> void siginthandler(int param) { printf("User pressed Ctrl+C\n"); exit(1); } int main() { signal(SIGINT, siginthandler); while(1); return 0; }
the output will be
^ CUser pressed Ctrl + C
how can i get it just
User pressed Ctrl + C?
c copy-paste sigint
josh simmonns
source share