Bug 8928 - getch() dumps core or returns 0 on SIGWINCH
Summary: getch() dumps core or returns 0 on SIGWINCH
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ncurses   
(Show other bugs)
Version: 6.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-01-27 19:33 UTC by jsamuels
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-03 18:13:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description jsamuels 2000-01-27 19:33:01 UTC
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>,
    at ../sysdeps/generic/libc-start.c:78

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

Comment 1 Bernhard Rosenkraenzer 2000-02-03 18:13:59 UTC
Try the current version (5.0-7) - there have been a lot of changes to SIGWINCH

Note You need to log in before you can comment on or make changes to this bug.