this program seems to not being able to intercept SIGQUIT signal Althought it can intercept SIGINT
void sig(int sig){
printf("Got signal(%d)", sig);
}
int main(){
signal(SIGQUIT, sig);
char x[10]; fgets(x, 10, stdin);
}
I am running ubuntu 20 and running stty -a
command gives first line output
which i guess mean SIGQUIT is correctly mapped to ^D but pressing it seems to do nothing .I also tryied with ^\ since i am confused between quit=^\
and eof=^D
as stty says so if someone can clear this misunderstanding between both two.
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;