Killing program using sigquit while using readline

24 Views Asked by At

My C program is reading a line from standard input using libreadline. I have only one terminal. How do I kill my program using SIGQUIT? Pressing ctrl+\ is not working.

I have tried pressing ctrl+, ctrl+++. ctrl+backspace etc.

1

There are 1 best solutions below

0
Rashmika Abeyrathna On

you can try to send a SIGQUIT signal to your C program that is reading input from the terminal using readline. Open another terminal/shell instance - Then you can send the kill command from there without interrupting readline input:

kill -SIGQUIT <program_pid>

or try Ctrl + c to kill the program