[resubmitting, this doesn't seem to have gotten to bug-bash on my first
try a few weeks ago]
Configuration Information [Automatically generated, do not change]:
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
+-DCONF_VENDOR='pc' -DLOCALEDIR='/tmp/share/locale' -DPACKAGE='bash' -DSHELL
+-DHAVE_CONFIG_H -DSOLARIS -I. -I. -I./include -I./lib -g -O2
uname output: SunOS xanadu 5.11 snv_108 i86pc i386 i86pc
Machine Type: i386-pc-solaris2.11
Bash Version: 3.2
Patch Level: 48
Release Status: release
On Solaris/OpenSolaris platforms, I have discovered what I believe is a
bug in lib/sh/winsize.c.
I discovered with a debugger that the get_new_window_size() function
has no effect on Solaris. In fact, here is what this file looks like if
you compile it:
$ dis winsize.o
disassembly for winsize.o
get_new_window_size: c3 ret
That's it-- an empty function. The problem is that the appropriate header
file is not getting pulled in, in order to #define TIOCGWINSZ.
As a result, even with 'shopt -s checkwinsize' set on Solaris, bash
does not check the win size on suspend of a program, or on program
exit. This is massively frustrating, and I know of several Solaris
users who have switched to zsh as a result of this bug.
I have not tried bash 4.0, but looking at the source code, it appears
that the bug is present there as well.
I added an ifdef clause which looks to see if the HAVE_TERMIOS_H define
is set, after the #include of config.h. If it is, then I #include the
termios.h header file. This solves the problem, which I confirmed by
rebuilding and dis'ing the function. I also ran my recompiled bash
and confirmed that it now worked correctly.
Thanks, I appreciate your time. I hope that I have adequately described
the problem; feel free to mail me if not.
Daniel Price, Solaris Kernel Engineering http://blogs.sun.com/dp