TIOCFLUSH of input only - any way to do it?

gwyn%brl-vld at sri-unix.UUCP gwyn%brl-vld at sri-unix.UUCP
Sat Jun 25 04:25:45 AEST 1983


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

I assume you are on a 4.1?BSD system.

You must gobble up the input in a loop to simulate "flush input only"
unless you have one of the newer (4.1c for example) BSDs in which case:

	int	arg = 1;	/* 1 is "FREAD" bit */

	ioctl( fd, TIOCFLUSH, &arg );

which flushes input only.



More information about the Comp.unix.wizards mailing list