[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] error while using nano in a chroot
From: |
David Lawrence Ramsey |
Subject: |
Re: [Nano-devel] error while using nano in a chroot |
Date: |
Thu, 06 Oct 2005 14:46:20 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20050923) |
David Lawrence Ramsey wrote:
<snip>
> The resizing problem is odd. The Meta-O toggle, along with the Meta-X
> toggle (does it also kick nano back into shape?), just calls
> window_init() and total_refresh(), but so does handle_sigwinch(), albeit
> with a few extra calls in between to properly redraw topwin and
> bottomwin. fg-ing should always call do_cont(), do_cont() should always
> call handle_sigwinch() unless you're using nano-tiny, and if you have
> meta toggles, you aren't using it. I'll look into this.
By the way, I've attached a port of the previous patch to nano 1.2.5.
If you apply it and then run the patched nano in a chroot, does the
resizing problem occur there too?
diff -ur nano-1.2.5/winio.c nano-1.2.5-fixed/winio.c
--- nano-1.2.5/winio.c 2005-03-22 10:04:02.000000000 -0500
+++ nano-1.2.5-fixed/winio.c 2005-10-06 14:42:14.000000000 -0400
@@ -25,6 +25,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <errno.h>
#include <ctype.h>
#include <assert.h>
#include "proto.h"
@@ -36,12 +37,14 @@
int blocking_wgetch(WINDOW *win)
{
- int retval = wgetch(win);
+ int retval;
- /* If we get ERR when using blocking input, it means that the input
- * source that we were using is gone, so die gracefully. */
- if (retval == ERR)
- handle_hupterm(0);
+ while ((retval = wgetch(win)) == ERR) {
+ /* If errno is EIO, it means that the input source that we were
+ * using is gone, so die gracefully. */
+ if (errno == EIO)
+ handle_hupterm(0);
+ }
return retval;
}