Thread View: comp.sys.ibm.pc.rt
1 messages
1 total messages
Started by D. Jason Penney
Tue, 07 Nov 1989 06:54
How Does rlogin Know Terminal Rows and Columns?
Author: D. Jason Penney
Date: Tue, 07 Nov 1989 06:54
Date: Tue, 07 Nov 1989 06:54
37 lines
2466 bytes
2466 bytes
My circumstances are a little complicated, but the problem is simple enough once I've explained it. I have a program driving a pseudo-tty which is running a shell. Within this pseudo-tty, I want all programs (such as vi) to know how many rows and columns they are dealing with. Just to complicate matters, suppose the original "physical" tty is something weird, like a window under sunview. Even worse, the window can be resized. In point of fact, if I "rlogin" to our AIX system using a SunView window, the resulting AIX session gets everything right. I can test it by climbing into vi and either typing away madly in insert mode, or examining the terminal height using ":se window". I can climb out of vi, resize my window (on the Sun, now), climb back into vi and see that AIX has properly registered the new window size. In a BSD system like SunOS, I use the TIOGCWINSZ and TIOCSWINSZ ioctl's to read the window's current size and to propogate it to the pseudo-tty. I even have a SIGWINCH to let me know when to do the ioctl's. I've RTFM'd the AIX Tech Ref until I'm blue in the face, and the solution still escapes me. I find it interesting that the BSD rlogin program is handshaking properly to the AIX rlogind. I would appreciate some one with the appropriate expertise (System V or AIX) or access to the source code to let me know exactly what I should be doing to 1) read my terminal characteristics (rows and columns) and, just as important, 2) propogate them to my pseudo-tty. As a bonus, it would be pleasant to know how to detect when the window size has changed (SIGWINCH). Please e-mail to me at the address below. Thanks in advance. -- D. Jason Penney Ph: (503) 629-8383 Beaverton, OR 97006 uucp: ...uunet!servio!penneyj STANDARD DISCLAIMER: Should I or my opinions be caught or killed, the company will disavow any knowledge of my actions...
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads