fixing ncurses init failed problem
- Posted by jbrown105 at speedymail.org Jun 20, 2003
- 576 views
I am not sure how ncurses tries to initalize the terminal, so I can't determine this with any certainty. I know that the linux command tty (/usr/bin/tty for me) with the -s option, will give an exit code to tell if stdin/out/err is a terminal or not. Using that check would allow exu to abort with an ex.err ("Attempted to write to screen, where screen wasn't a terminal" or something) instead of having ncurses just fail and die quietly. (Since this isn't the only way ncurses can fail to initalize its terminal, we'd need more that just this check ... but at least its a start.) jbrown -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html