Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!ames!ucbcad!ucbvax!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: stuff chars Message-ID: <10289@sun.uucp> Date: Tue, 9-Dec-86 21:27:16 EST Article-I.D.: sun.10289 Posted: Tue Dec 9 21:27:16 1986 Date-Received: Wed, 10-Dec-86 11:01:26 EST References: <19@houligan.UUCP> <2270@sdcsvax.UCSD.EDU> <104@quacky.UUCP> <378@yabbie.rmit.oz> Organization: Sun Microsystems, Inc. Lines: 30 Summary: Use (L)NOFLSH, either in S5 or 4.2 > > I have never found a way to change the handling of signals such that > > input is not flushed. > > If your system doesn't have TIOCSETN defined (usually in ) > then you're probably out of luck. Using stty(2) or stty(3) is equivalent > to TIOCSETP, that flushes input before changing the modes -- ie: typeahead. Yes, but that doesn't seem to be what he was asking for. It looks like he wanted to set things up so that a signal from the tty (SIGTSTP, in this case) didn't cause input to be flushed. There *is* a way to do this, both in 4.2BSD and in S3/S5. In 4.2/4.3, there's a bit (LNOFLSH) that can be set in the local mode word (using TIOCLSET or TIOCLBIS). In S5, the bit is called NOFLSH and is set in the "c_lflag" field of the "termio" structure. In either system, setting this bit causes the terminal driver not to do the normal flush of input (and output, for SIGINT and SIGQUIT) for signals generated from the keyboard. > SVR2 has an equivalent to TIOCSETN, TCSETAW, but it works > on a struct termio, instead of struct sgttyb. Well, actually, TCSETA is the equivalent of TIOCSETN; TIOCSETN neither waits for output to drain nor flushes input. TCSETAW waits for output to drain; TCSETA doesn't. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)