Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!munnari!moncskermit!goanna!yabbie!rcodi From: rcodi@yabbie.rmit.oz (Ian Donaldson) Newsgroups: comp.unix.wizards Subject: Re: stuff chars Message-ID: <378@yabbie.rmit.oz> Date: Sun, 7-Dec-86 08:39:39 EST Article-I.D.: yabbie.378 Posted: Sun Dec 7 08:39:39 1986 Date-Received: Tue, 9-Dec-86 09:51:58 EST References: <19@houligan.UUCP> <2270@sdcsvax.UCSD.EDU> <104@quacky.UUCP> Organization: RMIT Comm & Elec Eng, Melbourne, Australia. Lines: 27 Summary: got TIOCSETN? In article <104@quacky.UUCP>, dce@quacky.UUCP (David Elliott) writes: > 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. stty() is a system call on older versions of UNIX (and SVR2), but a library routine on ones that implement the TIOCSET[NP] ioctl's (eg: bsd derived systems). Similary, for gtty() and TIOCGETP. The 4.2bsd source for vi/ex has a conditional compile of the following nature: #ifdef TIOCSETN ioctl(..., TIOCSETN, ...); #else /* some comment grumbling about problems of typeahead flushing */ stty(..., ...); #endif in the routine that changes tty modes. SVR2 has an equivalent to TIOCSETN, TCSETAW, but it works on a struct termio, instead of struct sgttyb. Ian Donaldson