Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-21-2005, 06:42 AM   #1
Registered: Mar 2005
Posts: 60

Rep: Reputation: 15
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
Old 11-21-2005, 11:58 AM   #2
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 121Reputation: 121
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.
Old 11-27-2005, 01:09 PM   #3
Registered: Nov 2005
Location: Central America
Distribution: Mepis, Android
Posts: 393
Blog Entries: 4

Rep: Reputation: 181Reputation: 181
I think handling the term signal inside your code will avoid this. Somewhere near the startup of your program, include the following:

with a routine to handle this condition:

void MyTermRtn(){
        endwin(); /* tell ncurses to clean up */
        (other term logic)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kill procesed application fireedo SUSE / openSUSE 4 05-10-2005 12:24 PM
x server kill application keyboard shortcut/hotkey hypermegachi Linux - Newbie 2 07-25-2004 03:37 PM
kill and detect spesific application melinda_sayang Programming 5 05-23-2004 04:38 AM
Kill -9 not killing application, connected with cdrom busy error? vdemuth Linux - Software 5 04-11-2004 03:33 PM
ncurses-5.2-28 conflicts with file from package ncurses-5.2-12 tubby Linux - Software 4 06-16-2002 01:00 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration