kill -9 for ncurses application problem
hi all
i have written a muti-threaded application using ncurses. Now if i give a command "kill -9 <pid of the any thread>" sometimes i am console is not returning to normal mode, though all the threads are getting killed. Do anyone has an idea why it is happenning??? Thanks in advance. Arun KA |
ncurses is chaning the properties of your console to get it to do what it wants. Killing the process with -9 does not allow ncurses to clean up it's mess and set your console properties back to the original settings.
You can try running an 'stty sane' after the program exists to see if those settings give you something that you can work with without restarting your window. |
I think handling the term signal inside your code will avoid this. Somewhere near the startup of your program, include the following:
Code:
signal(SIGTERM,MyTermRtn); Code:
void MyTermRtn(){ |
All times are GMT -5. The time now is 12:23 PM. |