nano-devel
[Top][All Lists]
Advanced

[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 01:04:33 -0400
User-agent: KMail/1.8.2

On Thursday 06 October 2005 12:56 am, David Lawrence Ramsey wrote:
> Mike Frysinger wrote:
>  >whenever i launch nano in a chroot and resize the terminal, it closes
>  >with:
>  >Received SIGHUP or SIGTERM
>  >sometimes if i bg/fg a few times, the same thing will happen
>  >
>  >it's lying of course, it received no such signal ... the
>  >get_key_buffer() function calls wgetch() which returns ERR so
>  >handle_hupterm(0) is called and this message is displayed
>  >
>  >can anything be done about it or should i just keep living with it ? :)
>
> I've looked into it.  I don't have the time right now to set up a chroot
> with nano 1.3.x available on my system, but I have noted that the
> problem with the input source's being destroyed sets errno to EIO.  If
> wgetch() is returning ERR for another reason, errno should have a
> different value, and so it should just call wgetch() again until it gets
> a non-ERR value (since the buffering code will screw up if it gets an
> ERR in blocking mode).

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
...

> If I'm right, the attached patch against current CVS should fix the
> problem.  Would you let me know whether it does or not?  Thanks in
> advance.

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 ...

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




reply via email to

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