lkml.org 
[lkml]   [1997]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSignal handling or ioctl(TIOCGWINSZ) problem in kernel?
-----BEGIN PGP SIGNED MESSAGE-----

Okay,

Way way way back with kernel 1.3.81 or less, I had a problem with "stty size"
returning 0 rows, 0 columns at random times after starting X11 up in xterm
windows. The problem was fixed in 1.3.82 as per the following from
linux-kernel archives:

> Actually, it was a bug in signal handling. People who saw this might try
> out my pre-patch-1.3.82 on ftp.cs.helsinki.fi which should fix it.
>
> NOTE!! It's a pre-patch for a very good reason: it has some problems in
> other areas. I don't recommend running this for anything that is
> critical, but if you want to live dangerously..
>
> Linus

Somewhere between 2.0.28 and 2.0.30 this problem seems to have
re-appeared:

Last login: Fri May 16 23:43:59 on ttyp0 from :0.0.
You have mail.

gomer:~$ stty size
0 0
gomer:/usr/src/linux$ stty --version
stty (GNU sh-utils) 1.16
gomer:/usr/src/linux$ resize
COLUMNS=80;
LINES=52;
export COLUMNS LINES;
gomer:/usr/src/linux$ stty size
52 80

In stty.c from sh-utils:

static int
get_win_size (int fd, struct winsize *win)
{
int err = ioctl (fd, TIOCGWINSZ, (char *) win);
return err;
}

I took a quick look at tty_io.c under drivers/char in 2.0.28-30 and saw no
changes made there recently.

Final remarks:

Linux 2.0.30
sh-utils 1.16
libc 5.4.23
rxvt 2.20 (xterm binary has same problem)
XFree86 3.2

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: PGP Signed with PineSign 2.0

iQCVAwUBM30/37HhZuVGzoHdAQHjNwP/TCppfgba7yifFLs4yA9IaZfU51yXf5v3
PjsmB1XKaBfg565eTGWrEyr5zerOKyjCT623G9vKLCsaSbLzcA1uFAjio36g9C31
+61gUBm9jkgl8j3qU1crAx0Bux0M+5g+jME63mTr96qaYej0t1NiNyE4FLR/n7qI
rqeKGQJoXD8=
=NaK5
-----END PGP SIGNATURE-----

================================================================
| Greg Patterson | EMAIL: gomer@gomer.mlink.net |
| | gomer@mlink.net |
| Move over Microsoft, | IRC: Wizird (#Linux) |
| Linux is here to stay. | WWW: http://gomer.mlink.net/~root |
================================================================


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.028 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site