Commit c275dc57 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

attempt at fixing a problem tracked down by Jim Uhl, where nano will go

into an infinite loop if the terminal it's running in dies unexpectedly
due to a signal


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 10 additions and 0 deletions
+10 -0
......@@ -233,6 +233,11 @@ CVS code -
revstrstr(), revstristr()
- Add asserts. (DLR)
- winio.c:
get_buffer()
- If we get ERR when using blocking input, it means that the
input source that we were using is gone. In this case, call
handle_hupterm(), so that nano dies gracefully instead of
going into an infinite loop. (DLR, found by Jim Uhl)
titlebar()
- Rename some variables for consistency, make space an int
instead of a size_t, properly handle the case where the prefix
......
......@@ -140,6 +140,11 @@ void get_buffer(WINDOW *win)
input = wgetch(win);
/* If we get ERR when using blocking input, it means that the input
* source that we were using is gone, so die gracefully. */
if (input == ERR)
handle_hupterm(0);
#ifndef NANO_SMALL
allow_pending_sigwinch(FALSE);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment