Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!wivax!decvax!harpo!seismo!hao!hplabs!sri-unix!dbj.rice@rand-relay From: dbj.rice%rand-relay@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: TIOCFLUSH of input only - any way to do it? Message-ID: <2545@sri-arpa.UUCP> Date: Fri, 24-Jun-83 19:36:10 EDT Article-I.D.: sri-arpa.2545 Posted: Fri Jun 24 19:36:10 1983 Date-Received: Mon, 27-Jun-83 03:21:42 EDT Lines: 19 From: Dave JohnsonIf the third parameter to a TIOCFLUSH ioctl is nonzero, it is used as the address of an integer which specifies whether the input or the output queues or both are to be flushed. For example, the following should flush only the input queue: int i = FREAD; ioctl(fd, TIOCFLUSH, &i); The values FREAD for the input queue and FWRITE for the output queue may be specified (these come from sys/file.h). I haven't actually tried this, but the the code in the kernel (routines ttioctl and flushtty in tty.c) looks pretty straight forward. Dave Johnson Dept. of Math Science Rice University dbj.rice@Rand-Relay