bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why getch blocked when I did type something?


From: John Daker
Subject: Why getch blocked when I did type something?
Date: Tue, 16 Dec 2008 14:42:33 +0800

Hi,all
I recently had a problem that my program hang while I type something.
First I thought it is blocked in read() from the tty, but it happens
after I use select and set O_NONBLOCK .
And finally I realize that it is blocked in read() from getch() after
I gdb attach the process:

Attaching to process 8064
Reading symbols from /home/john/a...done.
Reading symbols from /usr/lib/libncurses.so.5...done.
Loaded symbols for /usr/lib/libncurses.so.5
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/i686/libpthread.so.0...done.
[New Thread 8192 (LWP 8064)]
Loaded symbols for /lib/i686/libpthread.so.0
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x420cdb44 in read () from /lib/i686/libc.so.6
(gdb) bt
#0  0x420cdb44 in read () from /lib/i686/libc.so.6
#1  0x4006cb44 in __JCR_LIST__ () from /lib/i686/libpthread.so.0
#2  0x4002db88 in kgetch () from /usr/lib/libncurses.so.5
#3  0x4002d335 in _nc_wgetch () from /usr/lib/libncurses.so.5
#4  0x4002d8b8 in wgetch () from /usr/lib/libncurses.so.5
#5  0x0804ba67 in main (argc=3, argv=0xbffffa54) at sitas.c:754
#6  0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) q

I do type something but the program hang there, does anybody know why?
Or maybe a bug of ncurses?
Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]