question about rlogin/window size

David Heath dave at boingo.med.jhu.edu
Tue Mar 26 08:56:54 AEST 1991


I am using the rlogin program on dec ultrix 4.0 to rlogin into various
hosts. Rlogin uses the TIOCGWINSZ ioctl to find the window size and pass
it to the remote rlogind. This USUALLY works for me. However, it sometimes
doesn't and NEVER works when I run rlogin from a shell script rather than
typing in the rlogin command myself. It also does not handle the sigwinch
signal to change the window size. (On the remote system, stty size reports
'0 0'.)

I looked at the source code, and there is a procedure called oob() that
is the SIGURG handler. If it is called and receives a message TIOCPKT_WINDOW
from the remote socket, then it sends the window size and permits sigwinch's
to send the window size. As far as I can tell with dbx, this is never
happening.

If I put the following in the beginning of doit(), then it seems to work:
  sendwindow();
  dosigwinch = 1;
  signal (SIGWINCH, sigwinch);
This is what would be done by oob() when it received TIOCPKT_WINDOW.

Does anyone know exactly how this is supposed to work and why it doesn't
work in a shell script (or under dbx for that matter)? Also, is there
a fix?

Any help is appreciated.
-dave heath
dave at boingo.med.jhu.edu



More information about the Comp.unix.ultrix mailing list