[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 13:58:33 -0400
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Mike Frysinger wrote:


>indeed ... i applied the patch and also added a perror() to see what
>errno was being set to and i got back:
>Interrupted system call
>Illegal seek
>Interrupted system call
>Illegal seek
>Interrupted system call
>Illegal seek

I thought there might be "Interrupted system call" (errno == EINTR)
messages in there somewhere.  Are you using ncurses in the chroot?  If
so, then the ncurses 5.4 curs_getch(3X) manpage is inaccurate:

"Programmers concerned about portability should be prepared for either
of two cases: (a) signal receipt does not interrupt getch; (b) signal
receipt interrupts getch and causes it to return ERR with errno set to
EINTR.  Under the ncurses implementation, handled signals never
interrupt getch."

Or maybe these are just some odd effects of being in a chroot...


>the upshot is that this patch does prevent nano from committing
>suicide, basically reverting the behavior to that of nano-1.2.x ... the
>downside is that nano doesnt resize itself properly, it acts as if the
>terminal was the samesize as before ...

At least it's progress, though...

>if i bg/fg and then hit meta+o (toggle support for using the first
>line), nano seems to kick itself back into shape ...

For right now, the previous patch is in CVS, as nano's not committing
suicide is definitely an improvement.

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.

reply via email to

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