brooks@lll-crg.llnl.gov (Eugene D. Brooks III) (08/04/88)
I have wanted to get a screen resize to be noticed properly by a SUN workstation (while running VI) for some time, in the sense that it works on a 4.3 BSD VAX or on a Sequent running DYNIX. I ported the 4.3 BSD VI to the SUN and VI actually started noticing the SIGWINCH event and reshooting the screen but it still was not getting the new size properly. Has anyone patched a SUN to get this feature to work properly? Does one also need the 4.3 BSD rsh or something? I suspect that the problem is with SUN software and not X software. Reply to brooks@maddog.UUCP or brooks@maddog.llnl.gov
guy@gorodish.Sun.COM (Guy Harris) (08/04/88)
> I have wanted to get a screen resize to be noticed properly by > a SUN workstation (while running VI) for some time, in the sense > that it works on a 4.3 BSD VAX or on a Sequent running DYNIX. Or, more correctly, sort of works some of the time. It doesn't work at all while you're in the middle of an insert command; it just masks the SIGWINCH signal. If you're not in the middle of an insert command, it works all too well; when it gets the SIGWINCH, it just "longjmp"s right out of whatever it happens to be doing, and if it wasn't finished, too bad, wham bam thank you ma'am. If you happen to be in the middle of reading in the file when you resize the window, well, you didn't really *want* those lines that it hadn't gotten around to reading, did you? The problem may be exaggerated on Suns somewhat by the fact that SIGWINCHes are delivered by SunView for events other than window size changes, such as iconification and de-iconification or window damage, and that they are delivered by the terminal emulator to the program running under it. This seems pointless for damage events, but can be useful for iconification and de-iconification if the program wants to blap out some escape sequence to update the icon label or something when it goes iconic. "xterm" doesn't appear to deliver SIGWINCHes except when the window size changes, so this may be less of a problem - but you should still avoid resizing the window when "vi" is not idle. > I ported the 4.3 BSD VI to the SUN and VI actually started > noticing the SIGWINCH event and reshooting the screen but it > still was not getting the new size properly. Has anyone patched > a SUN to get this feature to work properly? Does one also need the > 4.3 BSD rsh or something? I suspect that the problem is with > SUN software and not X software. I presume you're running SunOS 3.2 or later (otherwise, you don't have TIOCGWINSZ and would have had to rewhack the program). I just built it under 4.0 and, inside a "shelltool", it seems to get the size right, even when I "rlogin". There may be some weird problem with out-of-band data between the two machines, or there may be some problem with TIOCGWINSZ. Try running a small test program that just waits for SIGWINCH, does a TIOCGWINSZ, and dumps the sizes it gets.
bph@buengc.BU.EDU (Blair P. Houghton) (08/05/88)
In article <10974@lll-winken.llnl.gov> brooks@lll-crg.llnl.gov (Eugene D. Brooks III) writes: > >I have wanted to get a screen resize to be noticed properly by >a SUN workstation (while running VI) for some time[...] >[...]I suspect that the problem is with >SUN software and not X software. I think it's more likely to be with X than your sun, since my uVAX has the identical problem. However, most other things react properly to the resizing. I think it's VI that gets lost. --Blair "No, I don't know how to fix it. Er, Go ask your mother..." :-)