I am drawing a TUI using ncurses. The trouble is that whenever my program gets seg-fault, my terminal is left in mess. I can not see what I am typing. Its a pain since I am
Write a signal handler for SIGSEGV, etc. that calls endwin().
SIGSEGV
endwin()