Bug 8928 - getch() dumps core or returns 0 on SIGWINCH
getch() dumps core or returns 0 on SIGWINCH
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: ncurses (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-27 14:33 EST by jsamuels
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description jsamuels 2000-01-27 14:33:01 EST
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
Comment 1 Bernhard Rosenkraenzer 2000-02-03 13:13:59 EST
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.