Re: Strange pager (less, more) behavior



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.

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

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