It seems when you have a program that uses curses getch(), then change the size of your xterm, getch() returns 0 and not ERR (-1). This only happens some of the time. Most of the time, the program will dump core inside of the getch() call. getch() is defined as wgetch(stdsrc). ---From gdb--- Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libncurses.so.4...done. Reading symbols from /lib/libc.so.6...done. Reading symbols from /lib/ld-linux.so.2...done. Reading symbols from /lib/libnss_files.so.2...done. #0 0x40037067 in resizeterm () (gdb) bt #0 0x40037067 in resizeterm () #1 0x4003d085 in _nc_update_screensize () #2 0x40033804 in doupdate () #3 0x4002f457 in wrefresh () #4 0x40032480 in _nc_synchook () #5 0x40027eca in wechochar () #6 0x4002b044 in wgetch () #7 0x804a2e4 in domenu () #8 0x804a045 in main () #9 0x4006ccb3 in __libc_start_main (main=0x8049e24 <main>, argc=1, argv=0xbffffcf4, init=0x8048c58 <_init>, fini=0x804b0ec <_fini>, rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffcec) at ../sysdeps/generic/libc-start.c:78 (gdb) The returning of 0 doesn't appear to follow what the man page curs_getch.3x says should happen when signals are sent. Regardless, the function call dumps core most of the time when a SIGWINCH is sent. standard RedHat 6.0 egcs-1.1.2-12 glibc-2.1.1-6 ncurses-4.2-18
Try the current version (5.0-7) - there have been a lot of changes to SIGWINCH