[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: Mike Frysinger
Subject: Re: [Nano-devel] error while using nano in a chroot
Date: Thu, 6 Oct 2005 23:56:57 -0400
User-agent: KMail/1.8.2

On Thursday 06 October 2005 01:58 pm, David Lawrence Ramsey wrote:
> Mike Frysinger wrote:
>  >if i bg/fg and then hit meta+o (toggle support for using the first
>  >line), nano seems to kick itself back into shape ...
> 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.

ok, this quirk i think we can ignore ... using your hint to look into 
handle_sigwinch(), i found that it was a matter of my /dev/pts being empty

my chroot had /dev bind mounted to chroot/dev but i did not have /dev/pts bind 
mounted to chroot/dev/pts

handle_sigwinch() would call ttyname() which would return /dev/pts/17 which it 
would then try to open() for read/write ... however, since my /dev/pts was 
empty, nano would exit the function without doing any work

i guess the quirk that i could get it to sometimes resize is related to the 
comment right about COLS/LINES:
    /* Could check whether the COLS or LINES changed, and return
     * otherwise.  EXCEPT, that COLS and LINES are ncurses global
     * variables, and in some cases ncurses has already updated them. 
     * But not in all cases, argh. */

sorry for all the hubbub :)

reply via email to

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