[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG: Blocking read after SIGWINCH with nodelay set.
From: |
Thomas Dickey |
Subject: |
Re: BUG: Blocking read after SIGWINCH with nodelay set. |
Date: |
Tue, 20 Aug 2002 19:56:48 -0400 |
User-agent: |
Mutt/1.2.5i |
On Tue, Aug 20, 2002 at 07:25:01PM -0400, Sam Varshavchik wrote:
>
> I'm seeing this behavior with the Linux 2.4 kernel:
...but what version of ncurses? I had introduced a related bug, but fixed
last fall:
20011229
+ restore special case from 20010922 changes to omit SA_RESTART when
setting up SIGWINCH handler, which is needed to allow wgetch() to be
interrupted by that signal.
> Even when nodelay is enabled, ncurses still does a blocking read call
> after it receives a SIGWINCH. What I could figure out was that the first
> call to wgetch() after a SIGWINCH eventually makes its way to kgetch():
>
> for (;;) {
> if (!raw_key_in_fifo()) {
> if (fifo_push() == ERR) {
> peek = head; /* the keys stay uninterpreted */
> return ERR;
>
> raw_key_in_fifo() will return false, and kgetch() will then end up
> blocking by calling read() in fifo_push(), even though the nodelay mode is
> set.
>
> It looks like at this point the fifo buffer contains a single KEY_RESIZE,
> for which fifo_push() returns false.
>
> --
> Sam
>
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
- Re: BUG: Blocking read after SIGWINCH with nodelay set.,
Thomas Dickey <=