Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions Subject: Re: TIOCSTI vs SunOS 4.x Message-ID: <1991Mar23.081311.10785@thunder.mcrcim.mcgill.edu> Date: 23 Mar 91 08:13:11 GMT References: <6688@auspex.auspex.com> Organization: McGill Research Centre for Intelligent Machines Lines: 37 In article <6688@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: [missing attribution: the next paragraph is my text. -dM] >> I find that using TIOCSTI to push back the literal-next character is >> broken. On real Berkeley, doing this does what one would expect: >> the next character typed is literal-nexted. On SunOS 3.5, it works >> the same way. But under releases 4.0.3, 4.1, and 4.1.1, at least, >> doing this causes the pushed-back literal-next to quote itself >> somehow, rather than quoting the next character typed. > Well, SunOS 4.x's tty drivers (yes, "drivers"; in 4.x, TIOCSTI is > implemented by the device driver, not by "ldterm") implement TIOCSTI > by sending the character in question upstream as if it had arrived as > input, which makes it unlikely that it would be broken in the fashion > you describe. > However, just to make sure, I tested it, [...] [program, using TIOCSTI to push back LNEXT, then ERASE] > and, as I'd expected, after running that program in cooked mode under > the C shell, a DEL appeared as input (DEL being my erase character). > Under what circumstances did you get the behavior you describe? I did some experimenting, and the crucial thing seems to be that I had CBREAK mode turned on. Further experimenting seems to indicate that the problem actually is that literal-next simply does not work when CBREAK is enabled, an even worse problem, because it means that a program doing cbreak-style input leaves the user no way whatever to input the special characters. If you prefer, feel free to take that as the complaint instead :-) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu