TIOCSTI vs SunOS 4.x

der Mouse mouse at thunder.mcrcim.mcgill.edu
Sat Mar 23 18:13:11 AEST 1991


In article <6688 at auspex.auspex.com>, guy at 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 at larry.mcrcim.mcgill.edu



More information about the Comp.unix.questions mailing list