Re: Problem with /usr/X11R6/bin/xterm
Re: Problem with /usr/X11R6/bin/xterm
- Subject: Re: Problem with /usr/X11R6/bin/xterm
- From: Mike Sliczniak <email@hidden>
- Date: Mon, 06 Dec 2010 13:19:51 -0600 (CST)
Hi,
On Sat, 4 Dec 2010, Harald Hanche-Olsen - email@hidden wrote:
FWIW, I am unable to reproduce the problem with either xterm.
I run less /etc/passwd in the xterm, then start resizing.
And "less" follows along just fine, even when the xterm is made really
tall and narrow. Or have I misunderstood the nature of the problem?
It would be when you exited less you would notice that bash was messed-up
when you encountered long command lines I assume. I have noticed this
problem on Solaris before. I believe this FAQ answer cleared-up the
problem for me. Set checkwinsize:
http://www.faqs.org/faqs/unix-faq/shell/bash/
E11) If I resize my xterm while another program is running, why doesn't
bash notice the change?
This is another issue that deals with job control.
The kernel maintains a notion of a current terminal process group.
Members of this process group (processes whose process group ID is equal
to the current terminal process group ID) receive terminal-generated
signals like SIGWINCH. (For more details, see the JOB CONTROL section of
the bash man page.)
If a terminal is resized, the kernel sends SIGWINCH to each member of
the terminal's current process group (the `foreground' process group).
When bash is running with job control enabled, each pipeline (which may be
a single command) is run in its own process group, different from bash's
process group. This foreground process group receives the SIGWINCH; bash
does not. Bash has no way of knowing that the terminal has been resized.
There is a `checkwinsize' option, settable with the `shopt' builtin, that
will cause bash to check the window size and adjust its idea of the
terminal's dimensions each time a process stops or exits and returns
control of the terminal to bash. Enable it with `shopt -s checkwinsize'.
Good luck,
mzs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden