Re: Strange pager (less, more) behavior



On Thu, 30 Mar 2006 09:53:01 -0800,
Steve Kirkendall <skirkendall@xxxxxxxxxxxx> wrote:
Dave Ulrick wrote:
[source code omitted for brevity]

I've recreated my problem using this command line (run in a
directory with 71 .c files):

$ ./mycat *.c | less

As with my other programs, 'less' is stuck waiting on tcsetattr()
as called from raw_mode().

I tried the same thing here at least 50 times, and it ran flawlessly
every time. (This is on an old 2.4.32 kernel, if that matters.) Also,
I didn't spot any problems in your code. Here are two external
possibilities to consider:

* Maybe "less" is an alias which does something odd before running
the real "/usr/bin/less"? Try running "type less" to find out.

I've recreated the problem by invoking less with /usr/bin/less.

* Maybe some other process is running on your terminal in the background,
and interfering with "less". One way to find out is to run "tty" to
see which tty you're on, and then "fuser /dev/..." on that tty. You
should expect to see only the pids of the shell, ./mycat, and less.

I'll look into that. In fact, I'm starting to wonder if one of those
GNOME-ish things that ships with Fedora Core (a file monitor whose name I
can't recall) might be interfering with file allocations in a strange way.
The 2.6.5 system I've mentioned (that has no problem) is a SuSE 9.1 distro
instead of a FC2 distro, so it's free of GNOME stuff.

But basically, I'm just as baffled as you are.

I'm glad I'm not alone. :-)

Dave
--
Dave Ulrick
Email: d-ulrick@xxxxxxx
Web: http://www.niu.edu/~ulrick/
.