FreeBSD Bugzilla – Attachment 5882 Details for
Bug 13679
ncurses-based programs eat 100% CPU after telnet session is ungracefully closed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.26 KB, created by
fjoe
on 1999-09-10 14:40:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
fjoe
Created:
1999-09-10 14:40:02 UTC
Size:
1.26 KB
patch
obsolete
>*** lib_getch.c.orig Fri Sep 10 19:36:10 1999 >--- lib_getch.c Fri Sep 10 19:58:09 1999 >*************** unsigned char ch; >*** 77,82 **** >--- 77,84 ---- > if (tail == -1) return ERR; > again: > n = read(fileno(SP->_ifp), &ch, 1); >+ if (!n) >+ return ERR; /* EOF */ > if (n == -1 && errno == EINTR) > goto again; > T(("read %d characters", n)); >*************** int ch; >*** 140,147 **** > if (win->_use_keypad) > ch = kgetch(win); > else { >! if (head == -1) >! fifo_push(); > ch = fifo_pull(); > } > >--- 142,151 ---- > if (win->_use_keypad) > ch = kgetch(win); > else { >! if (head == -1) { >! if (fifo_push() == ERR) >! return ERR; >! } > ch = fifo_pull(); > } > >*************** int timeleft = 1000; >*** 192,197 **** >--- 196,203 ---- > > if (head == -1) { > ch = fifo_push(); >+ if (ch == ERR) >+ return ch; > peek = 0; > while (ptr != NULL) { > T(("ch = %d", ch)); >*************** int timeleft = 1000; >*** 215,221 **** > return(fifo_pull()); > } else { > T(("got more!")); >! fifo_push(); > ch = fifo_peek(); > } > } >--- 221,228 ---- > return(fifo_pull()); > } else { > T(("got more!")); >! if (fifo_push() == ERR) >! return ERR; > ch = fifo_peek(); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13679
: 5882