[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] (no subject)
From: |
Jim's Bugs |
Subject: |
[Nano-devel] (no subject) |
Date: |
Mon, 07 Mar 2005 20:10:14 -0800 |
There appears to be a subtle bug in nano that causes it to go into
an infinite loop in certain circumstances. The following sequence
reproducibly causes the problem on at least two versions of nano,
including nano 1.2.4 under OpenBSD/vax 3.6 and Debian sarge
on alpha, sparc and i386; as well as under Debian woody's
nano 1.0.6 on alpha, ultrasparc and i386. The login shell
may be bash or csh, possibly others:
1. Login to a tty as a normal user, say `fred'
2. Substitute user to fred:
su fred
3. Run nano
4. Login to another tty as fred and kill the intermediate shell
created by the su command
At this point on OpenBSD/vax 3.6, nano goes into an infinite
loop. Under Debian sarge, you have to return to the initial tty
and type keystrokes until one doesn't echo, at which point nano
goes into an infinite loop.
The problem is that rather than nano receiving a signal, in this
case it receives EOF on stdin. Unfortunately, nano does not seem
to test for this possibility and ignores the key stroke, causing
it to read the next character (still EOF) and go into an infinite
loop.
The solution, of course, is to test for EOF when reading from
stdin. Actually making a patch is, in my opinion, best left to
the author(s), as there is no convenient way to change all the
calls to wgetch to do the check.
I believe fixing this bug will also fix the following two bug
reports in Debian and Red Hat, respectively:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286781
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=124500
Both of these bugs appear to be related to an underlying
shell getting "yanked" out from under nano.
Hope that helps.
Jim Uhl
- [Nano-devel] (no subject),
Jim's Bugs <=
- Re: [Nano-devel] (no subject), David Lawrence Ramsey, 2005/03/08
- Re: [Nano-devel] (no subject), Jim's Bugs, 2005/03/21
- Re: [Nano-devel] (no subject), David Lawrence Ramsey, 2005/03/21
- Re: [Nano-devel] (no subject), Jim's Bugs, 2005/03/22
- Re: [Nano-devel] (no subject), Jordi Mallach, 2005/03/22
- Re: [Nano-devel] (no subject), Chris Allegretta, 2005/03/22
- Re: [Nano-devel] (no subject), Jordi Mallach, 2005/03/22