TIOCFLUSH of input only - any way to do it?

richl at tektronix.UUCP richl at tektronix.UUCP
Fri Jun 24 13:04:20 AEST 1983


The documentation states that an ioctl(fd,TIOCGETP,&foo)
will "wait until output is quiescent", and then fetch the
parameters. So what I did is do two consecutive ioctl calls:

	ioctl(fd,TIOCGETP,&foo);
	ioctl(fd,TIOCSETP,&foo);

where foo is the appropriate structure. Yes, it is
two system calls where one should do, but unless you
have local mods, it seems to be the only standard
way to do it. The TIOCSETP, of course, flushes both
queues, but output is now empty).



Rick Lindsley
richl at tektronix
..!tektronix!richl



More information about the Comp.unix.wizards mailing list